Construct a new keycode layout.
The human readable name for the layout.
A mapping of keycode to key value.
Array of modifier key names
Private
_codesPrivate
_keysPrivate
_modifierReadonly
nameThe human readable name of the layout.
Get the key for a 'keydown'
event.
The event object for a 'keydown'
event.
The associated key value, or an empty string if the event does not represent a valid primary key.
A concrete implementation of IKeyboardLayout based on keycodes.
The
keyCode
property of a'keydown'
event is a browser and OS specific representation of the physical key (not character) which was pressed on a keyboard. While not the most convenient API, it is currently the only one which works reliably on all browsers.This class accepts a user-defined mapping of keycode to key, which allows for reliable shortcuts tailored to the user's system.