NOTE: All major browsers now support
KeyboardEvent.prototype.key. Firefox already shipped with this for a while; recent versions of Edge, Chrome, and Safari also now have shipped support. This will still enable
KeyboardEvent.prototype.keyin environments where it may not yet be available.
Say goodbye to this:
And hello to this:
From standalone script
Just drop the script on your page and call the
If you're using AMD:
From npm (Node/Browserify/WebPack)
Install from npm:
npm install keyboardevent-key-polyfill
All code and content within this source-code repository is licensed under the Creative Commons Zero v1.0 Universal license (CC0 1.0 Universal; Public Domain Dedication).
You can copy, modify, distribute and perform this work, even for commercial purposes, all without asking permission.
For more information, refer to these following links: