function Keybindings( keybindings ) {
	var actions;
	var action;
	var keys;
	var key;
	var i;
	var j;

	if ( !( this instanceof Keybindings ) ) {
		return new Keybindings( keybindings );
	}

	// Initialize internal variables to store keybindings:
	this._action2Keys = keybindings;
	this._key2Action = {};

	// Create a hash table of keybindings:
	actions = objectKeys( keybindings );
	for ( i = 0; i < actions.length; i++ ) {
		action = actions[ i ];
		keys = keybindings[ action ];
		for ( j = 0; j < keys.length; j++ ) {
			key = JSON.stringify( keys[ j ], REPLACER );
			if ( hasOwnProp( this._key2Action, key ) ) {
				throw new TypeError( format( 'invalid argument. Each key in the keybindings argument must correspond to a single action. Value: `%s`', key ) );
			}
			this._key2Action[ key ] = action;
		}
	}

	return this;
}
Keybindings constructor.

@private
@constructor
@param {Object} keybindings - keybindings object
@throws {TypeError} each key must correspond to a single action
@returns {Keybindings} keybindings instance