Techtonica / keyboard-shortcuts-practice

https://techtonica.github.io/keyboard-shortcuts-practice/
27 stars 56 forks source link

Add highlight for Fn key in case F1-F12 is pressed. Fixes #29 #137

Closed Karska-dev closed 4 years ago

Karska-dev commented 4 years ago

According to all mentioned above links, and especially this one - https://superuser.com/a/432622, OS do not see specific scancode for Fn key. It's only possible to see the scancode of combination Fn and F1-F12. So, there is no possibility to highlight the Fn key separately while it pressed.

As a possible solution, I've added highlighting of the Fn key if any of F1-F12 codes are received(=Fn+F1-12 are already pressed together.)

Also, I've added Fn highlighting to hints.

For testing purposes I've added "How do you rename a symbol in VSCode?" shortcut to shortcut.json.

The only issue I have with F11 on MacOS - it can't be received by Browser, on Windows works well.

alodahl commented 4 years ago

Fixes #29

Karska-dev commented 4 years ago

This is great, thank you! What do you think, @vegetabill ?

My only concern is that fn continues to have focus after the fn1-12 keys are released, up until the reset for the next question. Could you have it highlight and un-highlight at the same time as the fn1-12 key?

Done! Could you please review it again?