Key is a tiny little keycode library for your browser. It makes keybound event assertions super simple.
To use Key without a package manager in-browser, copy/link
client/key.min.js and start using.
Just install with
npm install key or add it to your
Key is bound to the
window object, so usage in the browser is simple
var key = window.key
var key = require('key')
pressed = 13; // An event keycode (eg jQuery.event.which) key.get(pressed).name; // "Enter" key.is(key.code.special.enter, pressed); // true key.is(key.code.alnum.a, pressed); // false
The content of this library is released under the MIT License by Andrew Lawson.
You can find a copy of this license at http://www.opensource.org/licenses/mit