You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
While they are supported now still in the major browsers, they may not be at some point in the future.
The preferred direction is to use event.key. The one problem is that IE and older versions of Edge use older versions of the "key" spec, and may return different values. The "Example" listed here shows some of the different values:
Problem:
The event properties which, keyCode, and charCode are all removed from the Web standards. See the deprecation notice on MDN below:
https://developer.mozilla.org/en-US/docs/Web/API/KeyboardEvent/which
https://developer.mozilla.org/en-US/docs/Web/API/KeyboardEvent/keyCode
https://developer.mozilla.org/en-US/docs/Web/API/KeyboardEvent/charCode
While they are supported now still in the major browsers, they may not be at some point in the future.
The preferred direction is to use event.key. The one problem is that IE and older versions of Edge use older versions of the "key" spec, and may return different values. The "Example" listed here shows some of the different values:
https://developer.mozilla.org/en-US/docs/Web/API/KeyboardEvent/key
This shim is an example of how to re-mediate some of the differences: https://github.com/shvaikalesh/shim-keyboard-event-key/blob/master/index.js
The text was updated successfully, but these errors were encountered: