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

Adding mouse button support #248

Closed
wants to merge 0 commits into from
Closed

Conversation

lokxii
Copy link

@lokxii lokxii commented Mar 5, 2023

This pull request adds mouse button support on top of existing functionality in response to #195 and #245. A mouse button is made to treat as a key in config file such that writing (non-modifier) key + mouse combination not supported. It is however possible to do for example shift + alt - mouse_left.

A total of 32 keywords are added to correspond to what Carbon supports.

It is possible to use -k flag to synthesize a mouse click. However it is intentionally made to click at coordinates (-1, -1) to prevent clicking any elements on screen.

@NRKWL
Copy link

NRKWL commented Apr 28, 2023

Would love to see this merged. Any possibility of trackpad 4 finger swipe?

@lokxii
Copy link
Author

lokxii commented Apr 30, 2023

Accessing gesture events requires opening and focusing a window. You can access raw trackpad events with private frameworks (MultiTouch framework) but there are no gesture events.

Maybe you can define gestures from raw finger paths but I am not smart enough to do it. (Tried once before but could only get guessing gesture working) Moreover, listening to raw trackpad events requires adding its own listener. Some synchronization thing will also be needed to communicate between Carbon event listener and trackpad event listener. I'm afraid those would break the current structure of skhd.

You may want to check my repo to see my previous attempt detecting gestures from raw trackpad events

@NRKWL
Copy link

NRKWL commented May 4, 2023

Thank you for your detailed insights. Unfortunately implementing this is beyond my capabilities but I look forward to using your additional mouse functionality. Please reach out to me if you need any testing or automation assistance.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants