Hacker News new | ask | show | jobs
by jetzzz 873 days ago
The real story here is about bad JS KeyboardEvent API. I think a lot of JS code in the wild does these incorrect checks and author's code after "fixing" the bug is still incorrect. When handling keyboard shortcuts you want an exact match, in this case you want to check that the only modifier used is Ctrl. JS API does not make that easy, you need manually check that all other modifiers are not pressed.