7 comments

[ 3.2 ms ] story [ 27.6 ms ] thread
It feels like having a predefined list of keys that are ignored is a "hack". Would a better solution be to simply wait until none of the _trigger_ keys were pressed?

E.g. if the sequence was "Ctrl" + "F8" then it would just ensure that neither Ctrl nor F8 were pressed.

Came to write the same thing. Great post otherwise!
>If, for example, “shift” is held when it’s typing, letters will be capitalised

This applies regardless of whether Shift was part of the hotkey or not. ie in your case where the hotkey is Ctrl-F8, if Shift is held down while you press Ctrl-F8, then the xdotool spawned by hk will end up typing uppercase.

Saturday I had done a rare deep clean of my desk — including my keyboard.

I gave it a light tap, the key popped back up to its normal position, and hk -w started working as expected.

Whenever I clean a keyboard, it is customary for me to open a test app afterwards and press all the keys to make sure they work. That said, whenever I'm cleaning a keyboard it usually entails a full keycaps-off disassembly, but nonetheless I think it's always a good idea to go through a full function test afterwards.

(comment deleted)
that was the funniest debugging story i've read in recent memory.