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

Add ability to toggle/hold key #953

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

khyperia
Copy link

@khyperia khyperia commented Mar 8, 2025

Fixes #926

Adds a new togglekey() action, which holds a key until the binding is pressed again.

@khyperia
Copy link
Author

khyperia commented Mar 8, 2025

My use case is that in the game Final Fantasy 14, you need to hold right click to pan the camera around. This is annoying, so on Windows, I use the program X-Mouse Button Control to bind scroll-left to toggle holding right-click. With this patch, in keyd this now looks like:

[main]
scrollleft = togglekey(rightmouse)

Please feel free to reject this PR if it doesn't fit! I did this purely for my own personal use case, and am only submitting a PR in case it's useful for other people and you think it's valuable for keyd. I'll just continue running my fork if not! (And feel free to suggest any feedback or mistakes to help this PR get in.)

Thank you for your work on keyd! It's a super awesome tool~

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.

Ability to resolve a tap as a hold.
1 participant