New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
incorrect keycodes #62
Comments
It looks like jQuery logs different codes depending on whether the shift key is pressed. So 'a' is 97 and 'A' is 65. I think keymaster is deliberately treating each "key" as a single code and separating out the modifier. I would say it could potentially be more confusing to developers if 'a' and 'A' were treated as separate keys and this issue shouldn't be fixed for every case. However, I added a flag called ignoreCase which is set to true by default. If you set it to false, the lowercase keycodes will be used when the shift key is up and the uppercase keycodes will be used when shift is down. |
I spoke too soon. I found some bugs and will update when i fix. |
OK! Upon further investigation, I found that jQuery actually tries to 'normalize' the code for the 'which' property to make it consistent across browsers.
So KeyMaster actually will give you different codes on different browsers. That makes this a cross-browser / jquery issue more than a KeyMaster issue. If you want to differentiate between "a" and "A" in keymaster, you can add a callback for "a" or "shift + a" . |
Closed due to inactivity. |
It seems keymaster is reporting invalid keycodes.
If i log
e.which
from jquery and keymaster the results are different, keymaster's being the uppercase versionif you lookup those codes, jquery is return 'a' and keymaster is returning 'A'
The text was updated successfully, but these errors were encountered: