KeyboardEvent: keyIdentifier property

Non-standard: This feature is not standardized. We do not recommend using non-standard features in production, as they have limited browser support, and may change or be removed. However, they can be a suitable alternative in specific cases where no standard option exists.

Deprecated: This feature is no longer recommended. Though some browsers might still support it, it may have already been removed from the relevant web standards, may be in the process of being dropped, or may only be kept for compatibility purposes. Avoid using it, and update existing code if possible; see the compatibility table at the bottom of this page to guide your decision. Be aware that this feature may cease to work at any time.

The deprecated KeyboardEvent.keyIdentifier read-only property returns a "key identifier" string that can be used to determine what key was pressed. Its non-deprecated replacement is KeyboardEvent.key.

Specifications

Not part of any current specification. This property was part of an old draft of the DOM Level 3 Events Specification, but it was removed in later drafts in favor of KeyboardEvent.key.

Browser compatibility

desktop mobile
Chrome
Edge
Firefox
Opera
Safari
Chrome Android
Firefox for Android
Opera Android
Safari on iOS
Samsung Internet
WebView Android
WebView on iOS
keyIdentifier
Deprecated Non-standard
Chrome – No support
Chrome 26 – 53 (Release date: 2013-03-26)
footnote Removed in 54 and later
Edge – No support
Edge
footnote No support
Firefox – No support
Firefox
footnote No support
Opera – No support
Opera 15 – 40 (Release date: 2013-07-02)
footnote Removed in 41 and later
Safari – Full support
Safari 1.2 (Release date: 2004-02-02)
footnote Full support
Chrome Android – No support
Chrome Android 26 – 53 (Release date: 2013-04-03)
footnote Removed in 54 and later
Firefox for Android – No support
Firefox for Android
footnote No support
Opera Android – No support
Opera Android 14 – 37 (Release date: 2013-05-21)
footnote Removed in 41 and later
Safari on iOS – Full support
Safari on iOS 1 (Release date: 2007-06-29)
footnote Full support
Samsung Internet – No support
Samsung Internet 1.5 – 5.4 (Release date: 2013-09-25)
footnote Removed in 6 and later
WebView Android – No support
WebView Android 4.4 – 53 (Release date: 2013-12-09)
footnote Removed in 54 and later
WebView on iOS – Full support
WebView on iOS 1 (Release date: 2007-06-29)
footnote Full support

Legend

Tip: you can click/tap on a cell for more information.

Full support
Full support
No support
No support
Non-standard. Check cross-browser support before using.
Deprecated. Not for use in new websites.