client/lib/keyboard-shortcuts/index.js
function KeyboardShortcuts( keyBindings ) {
	if ( ! ( this instanceof KeyboardShortcuts ) ) {
		return new KeyboardShortcuts( keyBindings );
	}

	// the last key and when it was pressed
	this.lastKey = undefined;
	this.lastKeyTime = undefined;

	// the time limit for determining whether two keys in order represent a key sequence
	this.timeLimit = 2000;

	// save a copy of the bound last-key-pressed handler so it can be removed later
	this.boundKeyHandler = this.handleKeyPress.bind( this );

	// is the notifications panel open? If so we don't fire off key-handlers
	this.isNotificationsOpen = false;

	// bind the shortcuts if this is a browser environment
	if ( typeof window !== 'undefined' ) {
		keymaster.filter = ignoreDefaultAndContentEditableFilter;

		this.bindShortcuts( keyBindings );
	}
}
function KeyboardShortcuts( keyBindings ) {
	if ( ! ( this instanceof KeyboardShortcuts ) ) {
		return new KeyboardShortcuts( keyBindings );
	}

	// the last key and when it was pressed
	this.lastKey = undefined;
	this.lastKeyTime = undefined;

	// the time limit for determining whether two keys in order represent a key sequence
	this.timeLimit = 2000;

	// save a copy of the bound last-key-pressed handler so it can be removed later
	this.boundKeyHandler = this.handleKeyPress.bind( this );

	// is the notifications panel open? If so we don't fire off key-handlers
	this.isNotificationsOpen = false;

	// bind the shortcuts if this is a browser environment
	if ( typeof window !== 'undefined' ) {
		keymaster.filter = ignoreDefaultAndContentEditableFilter;

		this.bindShortcuts( keyBindings );
	}
}
KeyboardShortcuts accepts an array of objects representing key-bindings and creates an EventEmitter
which emits an event when a keyboard shortcut is triggered.

Format: [ { eventName: 'eventName', keys: [ 'command', 'enter'] }, ...]

(Optional): Setting the 'type' property of a key-binding to 'sequence' will cause the keyboard shortcut
event to trigger only after the keys have been pressed in sequence.