Sticky shift - how?

The reference manual is not detailed enough how I can use the MODMASK to define a sticky shift key.

The closest I got was replicating Shift in a macro
holdKey S- but neither holdKey sS- nor holdKey S-s or hsS- or whatever I tried worked. :frowning:

Would be great when Agent would offer a checkmark to define a modifier as a sticky one.

1 Like

Well, seems there is a typo in the firmware code :sob:… should be fixed by Fix macro-activated sticky modifiers. by kareltucek · Pull Request #629 · UltimateHackingKeyboard/firmware · GitHub .

This also means that you are the first one ever to use this feature (me included). Congratulations!

Now, what are you actually trying to do? Sticky modifiers are designed to work as part of a shortcut (typically alt+tab), so trying to get just shift alone is suspicious…

(Edit: correct syntax is holdKey sS- or just holdKey sS. The only one wrong is S-s - that would mean shift+s.)

Thanks Karel, if you did not knew yet – I am a good beta tester, often stumbling into edge cases. In other words the customer every salesperson fears… :wink:

A sticky shift is expected to work by pressing and releasing Shift and then applying the shift-function to the following key pressed, also called one-shot mod. This can speed up typing and can also be interesting for one-handed typing.

Or is sticky in UHK supposed to behave different to a one-shot mod?

1 Like

I see. In UHK terminology, sticky mods are modifiers of composite shortcuts that remain pressed even after key release.

Assume non-sticky alt+tab bound in the mod layer on the tab key. Now tap mod+tab+tab. Results in switching one windows back in window history and then back to the window that was active originally. This is because alt was released in between those two alt+tab activations.

Now assume sticky alt+tab bound in the mod layer on the tab key. Now tap mod+tab+tab. Results in switching two windows back in window history. Here the alt remains pressed until mod is released or another key is pressed.

(Note that the sticky mod deactivates before next activation, so it does not apply as a one-shot modifier would.)

1 Like

Regarding one shot functionality, oneShot modifier should be added in next release.


I see, thanks for explaining.

Cool, really looking forward that release. Does that also include one-shot-layer switching or would that be need to be dealt separately. In QMK I saw there are separate functions for both.

It covers both. The only thing it doesn’t compose well with is postponer-related functionality.

Great Karel! :slight_smile: Even more looking forward to the the next release.

1 Like