Skip to content
This repository has been archived by the owner on Nov 8, 2017. It is now read-only.

Minus (-) key doesn't work #59

Open
okonet opened this issue Jan 4, 2015 · 2 comments · May be fixed by #60
Open

Minus (-) key doesn't work #59

okonet opened this issue Jan 4, 2015 · 2 comments · May be fixed by #60

Comments

@okonet
Copy link

okonet commented Jan 4, 2015

On OS X 10.10 the minus key doesn't work (alone nor with meta keys), for example cmd+- won't fire a callback at all. I've found this gem in the source code: https://github.com/keithamus/jwerty/blob/master/jwerty.js#L186

Not sure why it's here, but removing the comment fixes the issue. Can someone comment on this one?

@okonet okonet changed the title Minus key doesn't work Minus (-) key doesn't work Jan 4, 2015
@keithamus
Copy link
Owner

hey @okonet thanks for the issue. Special keys on keyboards are difficult, because they don't map to all locales. To make matters worse, some browsers support different keycodes for the - (109 which we support) on your number row vs the - on the numpad (173 which we don't support), while some browsers report it as 189. So it can be wildly different depending on the browser, which sucks.

If you want to make a PR to add all 3 numbers to be - I'll merge it.

okonet added a commit to okonet/jwerty that referenced this issue Jan 6, 2015
…rted by browsers on Mac OS X (tested in 10.10). Closes keithamus#59
@okonet
Copy link
Author

okonet commented Jan 6, 2015

I've tested with 189 on Mac OS X 10.10 in Safari 8.0.2 (10600.2.5), Chrome 39.0.2171.95 (64-bit) and Opera 24.0.1558.64. I'm submitting a PR to merge.

okonet added a commit to okonet/jwerty that referenced this issue Jan 6, 2015
…ted by browsers on Mac OS X (tested in 10.10). Closes keithamus#59
@okonet okonet linked a pull request Jan 6, 2015 that will close this issue
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants