KeyboardEvent.which
A legacy KeyboardEvent
property that is equivalent to either KeyboardEvent.keyCode
or KeyboardEvent.charCode
depending on whether the key is alphanumeric.
IE | Edge | Firefox | Chrome | Safari | Opera | iOS Safari | Opera Mini | Android Browser | Blackberry Browser | Opera Mobile | Chrome for Android | Firefox for Android | IE Mobile | UC Browser for Android | Samsung Internet | QQ Browser | Baidu Browser |
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
49 | |||||||||||||||||
56 | 9.3 | 4.4
See notes:
|
|||||||||||||||
14 | 52 | 57 | 10 | 10.0-10.2 | 4.4.3-4.4.4
See notes:
|
4 | |||||||||||
11 | 15 | 53 | 58 | 10.1 | 44 | 10.3 | all | 56 | 10 | 37
See notes:
|
57
See notes:
|
52
See notes:
|
11 | 11.4 | 5
See notes:
|
1.2 | 7.12
See notes:
|
54 | 59 | TP | 45 | ||||||||||||||
55 | 60 | 46 | |||||||||||||||
56 | 61 |
Notes
This property is legacy and deprecated, but its replacement(s) are not yet widely supported.
-
1
event.which
number for keys does not always match expected value (difference may be dependent on hardware vs. on-screen keyboard?).