I am seeing a weird behaviour, but it’s hard to describe it. I’ll give it a try. I am also not sure if this is a direct result of your HRM implementation, but it somehow has to do with the postponer, and secondary behaviour.
<tl;dr> When typing a key on a secondary-activated layer that maps to a shifted symbol, the UHK sometimes looses the shift modifier when the keys are pressed and released in quick succession.</tl;dr>
I have this macro bound to right space:
numspace:
ifSecondary acceptTriggersFromSameHalf goTo secondaryaction
primaryaction: final holdKey space
secondaryaction:
setLedTxt 0 leftStatus '0-9' abbrev '0-9'
holdLayer fn4
ifLayer fn5 final setLedTxt 0 leftStatus "NUM" abbrev "NUM"
setLedTxt 1 leftStatus '0-9' abbrev '0-9'
(I can try to remove the setLedTxt and ifLayer parts but I don’t think it will make a difference.)
My i key maps to ‘8 *’ with LShift on the fn4 layer – it’s supposed to produce an asterisk (‘*’). When I hit it during quick typing as rightSpace+i it sometimes comes out as ‘*’ and sometimes as ‘8’.
It seems that the UHK processing logic looses the LShift in certain circumstances.
Full story, for those who love details:
I noticed this first while trying to type a wink smiley ![]()
My base layer maps the p key to scancode ‘p’, and my host keymap is Colemak, so this scancode will map to ;:, resulting in ; character unshifted and : character shifted.
My fn4 layer (which gets activated by the numspace macro (see above) as secondary action) maps the p key to ‘)’ (= scancode ‘0 )’ with LShift), which is also mapped to character ) by the host keymap.
When I press p, I get ;, so that’s correct.
When I press rightSpace and hold it a little, I see the fn4 indicator come up. When I then tap p while still holding rightSpace, I get ), so that’s correct too.
When I very quickly press rightSpace, then tap p and immediately let go of rightSpace in one smooth motion, I sometimes get ‘)’ and sometimes ‘0’, and sometimes ’ ;’ (with space in front).
The ‘)’ would be correct, the ‘0’ seems to have lost the LShift modifier, and the ’ ;’ is probably me having let go of the leftSpace too early, so I get space followed by unmodified p.
So my issue here is the ‘0’. This also happens with other shifted scancodes that sometimes loose the shift modifier when typed very quickly with that numspace macro.
I added acceptTriggersFromSameHalf to the ifSecondary command to make sure that rightSpace+p and rightSpace+‘i’ would trigger correctly when typed quickly. They are after all on the same keyboard half. My init macros set secondaryRole.advanced.acceptTriggersFromSameHalf false.


