Typing #
gives inconsistent keyCodes on Android:
Chrome on Ubuntu 14.10: "#" keyCode = 222
Chrome on Android 4.4.4: "#" keyCode = 51
Why is that??
onkeyup=alert(event.keyCode);
Typing #
gives inconsistent keyCodes on Android:
Chrome on Ubuntu 14.10: "#" keyCode = 222
Chrome on Android 4.4.4: "#" keyCode = 51
Why is that??
onkeyup=alert(event.keyCode);
The keycode values are not all standardized across browsers. There's a table of the differences at javascripter.net, where they say:
No, unfortunately, not all key codes are standardized. For example, the minus key has different key codes in different browsers.
Other examples they cite of keycodes commonly different between browsers are ;:
, =+
, and -_
.