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 - 130: Supported
- ✅ 131: Supported
- ✅ 132 - 134: Supported
Edge
- ✅ 12 - 130: Supported
- ✅ 131: Supported
Safari
- ❌ 3.1 - 4: Not supported
- ﹖ 5: Support unknown
- ✅ 5.1 - 18.0: Supported
- ✅ 18.1: Supported
- ✅ 18.2 - TP: Supported
Firefox
- ✅ 2 - 131: Supported
- ✅ 132: Supported
- ✅ 133 - 135: 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
- ◐ 131: Partial support
Safari on iOS
- ﹖ 3.2 - 4.3: Support unknown
- ✅ 5 - 18.0: Supported
- ✅ 18.1: Supported
- ✅ 18.2: Supported
Samsung Internet
- ❌ 4: Not supported
- ◐ 5 - 25: Partial support
- ◐ 26: 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
- ✅ 131: Supported
Firefox for Android
- ◐ 132: 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