-
-
Notifications
You must be signed in to change notification settings - Fork 39.7k
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
Support for custom keys/custom shifted keys in Autoshift #8127
Conversation
Keys can be added to AS without editing process_auto_shift.c Custom keys can be set for when any key is held longer than the timout Custom keys can override the action of an already enabled key (eg. one letter) Support for KC_NO; one can make a key have no action when held
When pressing a modifier, then an Auto Shift key, then releasing the mod before the AS key doesn't send the modifier. This is basically identical to the behavior PERMISSIVE_HOLD is meant to fix, so I'm not putting it in a separate #define.
There's a pending PR for a |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is a limited review surround how this would affect PR #7994. I'm going to take a more thorough look at this at a later time.
Talked a bunch with @ridingqwerty in Discord as well as tested a bit and |
It was actually the opposite of IGNORE_MOD_TAP_INTERRUPT, which should be the default, but the mods for an Auto Shift key are evaluated on release and therefore depend on mod release order, which is what IGNORE_MOD_TAP_INTERRUPT is supposed to *enable*.
My original note no longer applies since 7994 was merged (and probably didn't in the first place upon looking a second time)
Retargeted to |
550bb6a
to
9d827f9
Compare
1d4c0cd
to
65c27a3
Compare
a1b96ba
to
3430907
Compare
Hmm, could have sworn I'd closed this. I already have a replacement made for the major AS revamp that just got merged. Will open new pull in hopefully under a week. |
Allows keys to be added to AS without editing process_auto_shift.c
Custom keys can be set for when any key is held longer than the timout
Custom keys can override the action of a key already enabled in autoshift via #define or default (eg. one letter)
Support for KC_NO; one can make a key have no action when held
Permissive Hold-like behavior (see ced1019's commit message) for when accidentally releasing modifier before Auto Shift key.Removed, actually the opposite ofIGNORE_MOD_TAP_INTERRUPT
which is by default 'enabled' (in behavior) for Auto Shift because modifiers are evaluated on release, not press. Breaking change and will be put in another pull once I work out the kinks and this is merged.Description
I've made a function definable in one's keymap to add and/or set shifted values of keys. The return value of the function, if it is a key, will be the shifted value. If it is -1, the key will have its default shifted value, but be added to AS. -2 is the default, and changes nothing.
This shouldn't be a breaking change, but it is a rather large refactor. One of the main things I'm not sure about is the return values. . . as I wanted support for KC_NO as a shifted key (and needed two extra return values anyway, default shifted value and not autoshifted), I just went with negative numbers as they seemed easiest for the user to type and couldn't cause conflicts.
Also, there's no way to remove a key from autoshift. Not a big deal, but if you want all but one letter enabled you'll need a case for KC_A ... KC_J and KC_L ... KC_Z and to disable AS_ALPHA. Would be nice to fix.
Types of Changes
Checklist
Planning on doing it tomorrow.Done.Example custom function: