-
Notifications
You must be signed in to change notification settings - Fork 145
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: make actions like fork and switch react to keys being pressed without sending/inputting them, or a way to block their input #782
Comments
Resolving this ticket might also satisfy the use case: |
The implementation of operating on fake keys for switch/fork should be a mostly straightforward reimplementation of the mentioned actions, but instead of operating on active keycodes, the underlying action would operate on coordinate - and the parsing layer makes use of the appropriate fake key coordinates. |
Some of the relevant code in case someone wants to give it a shot: https://github.com/jtroo/kanata/blob/main/keyberon/src/action/switch.rs Line 1598 in bcad5e0
Line 1584 in bcad5e0
Line 2981 in bcad5e0
Line 2824 in bcad5e0
Line 2295 in bcad5e0
|
This is now partially implemented in #809 |
This should now be implemented, though without documentation yet. Can follow the test example to see how it works for now kanata/parser/src/cfg/tests.rs Lines 780 to 781 in 7cdbffb
kanata/parser/src/cfg/tests.rs Lines 796 to 799 in 7cdbffb
As a note the naming change from fake to virtual as in discussed in #790 is in progress. |
The functionality is now documented too |
Is your feature request related to a problem? Please describe.
I wanted a way to kanata do something if I have a key pressed/held, but without sending that key i.e. do x normally, but do y if kp2 (numpad key 2) is pressed, but never sending/inputting the kp2 key (so the number 2 won't be spammed).
I guess that would effectively sacrifice the key, at least on that hypothetical layer, but it's tradeoff that's worth it. And you could always type that key normally on another layer, if needed.
I guess a solution would be to remap, say, the kp2 key to a non-printable character, like f13-f24. But I would like to use other keys (printable keys) because I'm already using those non-printable characters for other functions. And they aren't enough e.g. I have a mmo mouse with 13 buttons (besides mleft mrgt mmid). The f13-f24 keys simply aren't enough to cover all of them (not even counting the other uses those non-printable keys are assigned already), hence the need to do it with printable keys as well.
Describe the solution you'd like.
An action to block the key, but still make it key press and key release recognizable to kanata e.g. for the fork, switch, fakekeys functions.
Describe alternatives you've considered.
Couldn't think of any alternatives.
Additional context
No response
The text was updated successfully, but these errors were encountered: