Hacker News new | past | comments | ask | show | jobs | submit login
Debugging a Failing Hotkey (tratt.net)
55 points by ltratt 10 months ago | hide | past | favorite | 6 comments



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.


If you have a keyboard that runs QMK firmware[0] with the VIA[1] feature enabled[2], then there is a convenient testing app available from the same place you customize your keys [3].

[0] https://qmk.fm/ [1] https://www.caniusevia.com/ [2] https://www.caniusevia.com/docs/configuring_qmk [3] https://www.usevia.app/


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.


>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.


Came to write the same thing. Great post otherwise!


that was the funniest debugging story i've read in recent memory.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: