Skip to content
This repository has been archived by the owner on Aug 22, 2023. It is now read-only.
larukedi edited this page Dec 15, 2014 · 1 revision

Converts a keyname to keycode

Usage: $l.keys.keyName(keyname)

console.log($l.keys.keyName(13));
// returns 'enter'

Assigns a hotkey

Usage: $l.keys.assign({target: target, key: key, shift: shift, ctrl: ctrl, alt: alt, disableInputs: disableInputs, fnc: fnc})

$l.keys.assign({
    target: document,
    key: 'f7',
    fnc: function() { alert('pressed.'); }
});
Clone this wiki locally