index.js
function(key, callback, options) {
        var binding;

        key = key.charCodeAt ? key.toUpperCase().charCodeAt() : key;
        options = assign({}, DEFAULT_OPTIONS, options || {});
        binding = { callback: callback, options: options };

        if (!this.keyBindings[key]) {
            this.keyBindings[key] = [binding];
        } else {
            this.keyBindings[key].push(binding);
        }
    }
function(key, callback, options) {
        var binding;

        key = key.charCodeAt ? key.toUpperCase().charCodeAt() : key;
        options = assign({}, DEFAULT_OPTIONS, options || {});
        binding = { callback: callback, options: options };

        if (!this.keyBindings[key]) {
            this.keyBindings[key] = [binding];
        } else {
            this.keyBindings[key].push(binding);
        }
    }
function ( key , callback , options ) { var binding ; key = key . charCodeAt ? key . toUpperCase ( ) . charCodeAt ( ) : key ; options = assign ( { } , DEFAULT_OPTIONS , options || { } ) ; binding = { callback : callback , options : options } ; if ( ! this . keyBindings [ key ] ) { this . keyBindings [ key ] = [ binding ] ; } else { this . keyBindings [ key ] . push ( binding ) ; } }
Bind a callback to the keydown event for a particular key.

The options argument may contain booleans which describe the modifier
keys to which the key-binding should apply. If options.input is true,
then the supplied callback will be invoked even if the keydown event
is triggered on an input field or button.

@param {!number|!string} key - A keyCode or single lowercase character.
Set options.shift = true for uppercase.
@param {!function} callback
@param {{alt: boolean, ctrl: boolean, meta: boolean, shift: boolean,
input: boolean}} options
Bind a callback to the keydown event for a particular key .