Closed kareltucek closed 4 years ago
Let me know if the initial post remains unclear.
@matthewwardrop I am afraid I am still unclear on the key-related notation you are using. I still see things like press + <Key mapped to >
or + <key mapped to + <`>>
, where at most one key of a shortcut is clear. I guess that you probably mean specifically the super + backtick
combination (mentioned in gnome docs), but from lack of any mention of the super
(/gui
/win
) modifier it could as well be that you are trying to use the backtick itselfs as a modifier (which would be a problem).
(Also a side-reply on the relation of this fork w.r.t. the official one... Without much diplomatic talk, I am the always dissatisfied guy who has (at some point) started hacking the firmware in order to implement (some of the) refused feature requests. The code of the fork is (of course) fully available, but my philosophy is "let the user build it from small but general building blocks" while official philosophy is more of the conservative "keep it nice and simple" kind. As a result, there is some flow of features and bug fixes between the two firmwares, but the fork fits the "decidedly outside of the scope of the official firmware" definition pretty well.)
Let's try again :). I want the <Alt> + <grave/backtick>
shortcut to be sticky, as is <Alt> + <Tab>,
when simulating those key presses using <Mod> + <g>
; where g here makes sense because it is right next to the default window switching shortcuts in the default mod layout. The solution seems to be either to hard-code some extra keycodes as sticky, or to make it configurable per key mapping. I understand the latter is probably a large chunk of work, and so I'd be happy with hard-code keymaps, and even, if necessary, to compile my own version of the firmware with these changes (that I would make myself). If this is not a highly sought after feature, then I would not want you to waste your time generalising things unnecessarily.
(And thanks for your explanation re:the nature of this repo. I think I have a similar scratch-the-itch approach in many of my projects, but doubt I will have a lot of time to devote here. If that changes, perhaps you can expect some PRs). ;).
Alright, I see now.
From my point of view, the possible solutions are:
stick
/sticky
flag, so as a result stickiness could be achieved on per-key basis via macros like $holdKey sticky LA-graveAccentAndTilde
.That sounds great! Thanks @kareltucek .
For my edification, what are the scancodes that are actually sent on the USB channel for a sticky key with a <alt> + <tab>
like keystroke? I presume it is something like:
- <alt> down
- <tab> down
- <tab> up
- time passes
- <alt> up
And so with the <mod> + <g>
keystroke, we would tie the <alt>
events with the mod key strokes; such as:
<mod> + <g>
- <alt> down
- <grave> down
release <g>
- <grave> up
hold <g>
- <grave> down
release <g>
- <grave> up
release <mod>
- <alt> up
Is that right?
Yes, that's right.
The interesting thing about sticky modifiers is that the modifier also releases once another action gets triggered, which can happen even before release of <g>
, in that case it looks like (assuming that space is mapped to space on all layers):
press <mod>
press <g>
- <alt> down
- <grave> down
press space
- <alt> up
- <space> down
release <g>
- <grave> up
Interesting. Is that behaviour unique to your firmware? I don't see that behaviour on stock firmware. When I press
Interesting... is your space bound to a scancode action on the layer where you are testing it?
The behaviour should be the same on both firmwares.
Oh... whoops! I had completely forgotten I'd remapped the Space bar to
Implemented. $holdKey sticky LA-graveAccentAndTilde
macro should work in next release. Also, it will be possible to select one of three "stickiness" strategies to stick always
never
or smart
.
(I will release it once I finish with a few other issues.)
Nice... Thanks @kareltucek !
Finally had a chance to play with this, and it works beautifully (once I figured out how to use macros)!
Thanks again!
Glad to hear!
Followup of UltimateHackingKeyboard/firmware#299 .