Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature request: Mouse button support #39

Open
ghost opened this issue Mar 10, 2021 · 3 comments · May be fixed by #101
Open

Feature request: Mouse button support #39

ghost opened this issue Mar 10, 2021 · 3 comments · May be fixed by #101
Labels
enhancement New feature or request

Comments

@ghost
Copy link

ghost commented Mar 10, 2021

I wonder if there would be any interest in mouse button support for Capsicain?

I don't expect anything too far beyond the existing behaviour; handling exactly the same as the existing keyboard support, but with M1-M5 buttons also, would be super useful. I would like to use my mouse buttons as keys, and vice-versa, to help address some medical issues with my hands.

I would be happy to assist with any code contributions you might need, if that helps any?

Great project, either way. Cheers!

@cajhin
Copy link
Owner

cajhin commented Mar 10, 2021

That shouldn't be too hard, Interception can deal with mice (just a couple of flags to change). I didn't do it because of performance (mice send a LOT of updates when you move them; I would make this optional via config switch).
An unsolved issue is that I would first need to map the mouse buttons to (virtual or real) keys, since the 'rule engine' only knows keys.
Can you give examples of what exactly you intend to do with the mouse buttons? It's not a use case for me, so I might be missing the point.

@ghost
Copy link
Author

ghost commented Mar 10, 2021

Hey thanks for giving it some thought! I'm also unsurprised to hear you're considering performance, I noticed capsicain was very responsive. I wouldn't want to interfere with that.

A common example for me would be that I use the 'forward' button on the side of the mouse, as the 'ctrl' key. Handy for all those things that need ctrl+click or ctrl+drag, when my left hand decides it doesn't want to act right. Similarly, the 'back' button is my 'shift' key.
I'd really like to be able to fire off mouse events with my left hand, or swap around mouse buttons for when one finger decides today is not a good day. I can't do that so far, but it's part of the pipe dream. I get joint/tendon problems that flare up seemingly at random so some days I ought not be using a certain limb/digit/etc but I'm otherwise good to go. Being able to map a mouse button to the space bar would be a boon, having a busted left thumb really ruins my day for hitting space ;)

You mentioned mapping keys to real/virtual keys, it may be worth a mention that I use some of the F13-F24 keys on my extra mouse buttons so that those buttons are visible to the system despite not being actual mouse buttons. I don't know if that might interfere?

@bitoj
Copy link
Contributor

bitoj commented Mar 13, 2021

Regarding F24:

For convenience and to avoid misunderstandings (especially when assigning unused scancodes for mouse keys) it would be an improvement to add F24 to the list of defined keys, to replace SC_0x76.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
2 participants