KeyboardEvent.which
- UNOFFA legacy KeyboardEvent
property that is equivalent to either KeyboardEvent.keyCode
or KeyboardEvent.charCode
depending on whether the key is alphanumeric.
Chrome
- ✅ 4 - 128: Supported
- ✅ 129: Supported
- ✅ 130 - 132: Supported
Edge
- ✅ 12 - 128: Supported
- ✅ 129: Supported
Safari
- ❌ 3.1 - 4: Not supported
- ﹖ 5: Support unknown
- ✅ 5.1 - 17.6: Supported
- ✅ 18.0: Supported
- ✅ 18.1 - TP: Supported
Firefox
- ✅ 2 - 129: Supported
- ✅ 130: Supported
- ✅ 131 - 133: Supported
Opera
- ﹖ 9 - 9.6: Support unknown
- ✅ 10 - 113: Supported
- ✅ 114: Supported
IE
- ❌ 5.5 - 8: Not supported
- ✅ 9 - 10: Supported
- ✅ 11: Supported
Chrome for Android
- ◐ 129: Partial support
Safari on iOS
- ﹖ 3.2 - 4.3: Support unknown
- ✅ 5 - 17.6: Supported
- ✅ 18.0: Supported
- ✅ 18.1: Supported
Samsung Internet
- ❌ 4: Not supported
- ◐ 5 - 24: Partial support
- ◐ 25: Partial support
Opera Mini
- ❌ all: Not supported
Opera Mobile
- ✅ 10 - 12.1: Supported
- ✅ 80: Supported
UC Browser for Android
- ✅ 15.5: Supported
Android Browser
- ﹖ 2.1 - 2.2: Support unknown
- ✅ 2.3 - 4.3: Supported
- ◐ 4.4 - 4.4.4: Partial support
- ✅ 129: Supported
Firefox for Android
- ◐ 130: Partial support
QQ Browser
- ✅ 14.9: Supported
Baidu Browser
- ◐ 13.52: Partial support
KaiOS Browser
- ✅ 2.5: Supported
- ✅ 3: Supported
This property is legacy and deprecated. "Some key events, or their values, might be suppressed by the IME in use". On mobile (virtual keyboard), all keys are reported as 229.
- Resources:
- MDN Web Docs - which