ccampbell/mousetrap

Capitalized keybindings work for binds registered with "keypress" action but not for "keydown" action

Opened this issue · 0 comments

Just letting you know about this inconsistency! If I bind keypress actions specified with an uppercase character, like "H", it works. However, if I bind "keydown" actions, these bindings do not work, instead I have to use "h".

Why am I using keydown instead of keypress? Well, recently I encountered some funky behavior where the keypress handler wasn't working in firefox - I suspect that this was a change in behavior the site that I am extending - mgsloan/todoist-shortcuts#40 - so that probably not a mousetrap issue. Curiously, I still got key repeat even when using "keydown" actions, which was surprising.

Sorry for not including a more direct repro in this issue report. This is more of letting folks know there's an issue like this - the workaround for me was quite straightforward. Instead I just use shift+lower instead of the uppercase form of the keybinding.

Note that I have a modified version of mousetrap. However, I am pretty confident that this is not due to any You might be interested in what I've added, let me know if I should open some PRs - master...mgsloan:master