JavaScript
(function(jQuery) {
jQuery.fn.__bind__ = jQuery.fn.on;
jQuery.fn.__unbind__ = jQuery.fn.off;
jQuery.fn.__find__ = jQuery.fn.find;
var hotkeys = {
version: '0.7.9',
override: /keypress|keydown|keyup/g,
triggersMap: {},
specialKeys: {
27: 'esc',
9: 'tab',
32: 'space',
13: 'return',
8: 'backspace',
145: 'scroll',
20: 'capslock',
144: 'numlock',
19: 'pause',
45: 'insert',
36: 'home',
46: 'del',
35: 'end',
33: 'pageup',
34: 'pagedown',
37: 'left',
38: 'up',
39: 'right',
40: 'down',
109: '-',
112: 'f1',
113: 'f2',
114: 'f3',
115: 'f4',
116: 'f5',
117: 'f6',
118: 'f7',
119: 'f8',
120: 'f9',
121: 'f10',
122: 'f11',
123: 'f12',
191: '/'
},
shiftNums: {
"`": "~",
"1": "!",
"2": "@",
"3": "#",
"4": "$",
"5": "%",
"6": "^",
"7": "&",
"8": "*",
"9": "(",
"0": ")",
"-": "_",
"=": "+",
";": ":",
"'": "\"",
",": "<",
".": ">",
"/": "?",
"\\": "|"
},
newTrigger: function(type, combi, callback) {
var result = {};
result[type] = {};
result[type][combi] = {
cb: callback,
disableInInput: false
};
return result;
}
};
hotkeys.specialKeys = jQuery.extend(hotkeys.specialKeys, {
96: '0',
97: '1',
98: '2',
99: '3',
100: '4',
101: '5',
...