src/keys.js
function Key(name, code) {
        this.name = name;
        this.code = code;

        // If a new Key is instantiated with a name that isn't
        // in the internal keymap, make sure we add it
        Key.internals.keymap[name] = Key.internals.keymap[name] || code;
    }
function Key(name, code) {
        this.name = name;
        this.code = code;

        // If a new Key is instantiated with a name that isn't
        // in the internal keymap, make sure we add it
        Key.internals.keymap[name] = Key.internals.keymap[name] || code;
    }
function Key ( name , code ) { this . name = name ; this . code = code ; // If a new Key is instantiated with a name that isn't // in the internal keymap, make sure we add it Key . internals . keymap [ name ] = Key . internals . keymap [ name ] || code ; }
Constructs a new instance of Key from a name and a keycode
@class Key
@classdesc Key represents the mapping between a physical key's name and it's machine code.
It contains static references to all known keys, e.x. `Key.A` - and allows you
to map a name or key code to one of those static instances.
@param {string} name - The name of the key
@param {number} code - The key code for the key
Constructs a new instance of Key from a name and a keycode