-
Notifications
You must be signed in to change notification settings - Fork 141
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: unmod action to temporarily release mods #615
Comments
An alternative would be to:
Edit: on the second thought, this is not a good idea, because it will break shift for all other keys, unless they are added |
Another alternative:
Edit: actually, this will not work correctly due to the same reason you've posted this issue... |
Interesting use case! I can't think of any workarounds, so the action is added, I think pretty much as-suggested. Out of simplicity, unmod will unmodify everything for now. If someone needs to keep some modifiers but not others, the PR should be a good reference for how to implement it. Sample mini-config that I tested and works:
|
there is the brand new side effect |
As an additional note, one reason this feature is needed and I can't use most workarounds is that the accented letters aliases I make are used in other macros or chords. For example, if I use chords to write whole words of phrases, like The first one is related to accented letters as described above, turning With Thank you @jtroo for making this so quickly, and thanks for kanata as a whole. I've been using QMK keyboards for years and being finally able to use home row mods and combos on my laptop keyboard is super nice. |
Where is this feature documented ? I can not see here : https://github.com/jtroo/kanata/blob/v1.5.0-prerelease-2/docs/config.adoc |
I think an explicit |
@gerhard-h can you show a practical example of how |
With these aliases, when holding shift and typing
It also enables shift forking on all tap holds I tried to achieve this with only |
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as off-topic.
It worked after build from source, thanks.
I use fork in a nested way, it works as intended, on semicolon press it shifts navigation layer; on using with left shift it emits colon and on right shift emits semicolon, few things I noted,
switch makes this scenario easier
Still no key repeat with unmod |
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as off-topic.
Key repeat is fixed, and unshift added, in #638. |
Implement unshift and make unmod+unshift key repeat work. Implements #615.
When building an upper case layer, you want shift to revert back to lower case like
This can be achieved with |
It has taken me a while to figure out why `unmod` had no effect in my mappings. After running in debug mode I realized that the events sent by the modifiers are not tracked at all, since they are not part of my source mapping. When seeing this I remembered seeing `process-unmapped-keys` enabled in [this comment](#615 (comment)) while digging through some issues. Doing so resulted in the expected behavior.
It has taken me a while to figure out why `unmod` had no effect in my mappings. After running in debug mode I realized that the events sent by the modifiers are not tracked at all, since they are not part of my source mapping. When seeing this I remembered seeing `process-unmapped-keys` enabled in [this comment](jtroo#615 (comment)) while digging through some issues. Doing so resulted in the expected behavior.
Is your feature request related to a problem? Please describe.
My OS-side layout is US-intl, and I often write in French so I write accent with dead keys. For example, I type
'e
to geté
.To that effect I made some aliases for accents, like this:
(defalias é (macro ' e))
This works great, but if I want to get a capitalized accented E (
É
) I can't just use that alias with shift held down, because the shifted version of' e
is" E
, and I get anË
.Describe the solution you'd like.
The way I dealt with that on my QMK boards was to save the held down mods, clear them, write the
'
and then re-enable the saved mods. You can see my actual implementation here, along with theaccented_letter
function making use of it just below.The way I see this looking like in a kanata config is this:
(defalias é (macro (unmod ') e)
.This way, if you use the alias without having shift held down you get
é
, and if you do with shift held down, only thee
gets affected by it and you getÉ
as intended.Describe alternatives you've considered.
None I could think of. In my case I guess I could keep a dead quote key somewhere in my keymap, but the one on my main layer is usually replaced with an "un-dead" quote (
(defalias apo (macro ' spc))
).Additional context
I'm not sure if the right route for this is actually an
unmod
action, or anunshift
action, or even throwing inunalt
,unmeta
andunctrl
actions as well, because why not. Or all of the above.In my case at least, would be the most useful one, but I could see every variant being useful to someone.
The text was updated successfully, but these errors were encountered: