Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 13 additions & 2 deletions keymaster.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,12 +25,19 @@
home: 36, end: 35,
pageup: 33, pagedown: 34,
',': 188, '.': 190, '/': 191,
'`': 192, '-': 189, '=': 187,
'`': 192,
'-': function() {
return (getBrowserName() == "firefox") ? 173 : 189;
},
'=': function() {
return (getBrowserName() == "firefox") ? 61 : 187;
},
';': 186, '\'': 222,
'[': 219, ']': 221, '\\': 220
},
code = function(x){
return _MAP[x] || x.toUpperCase().charCodeAt(0);
var code = _MAP[x] || x.toUpperCase().charCodeAt(0);
return (typeof code === "function") ? code() : code;
},
_downKeys = [];

Expand All @@ -52,6 +59,10 @@
return true;
}

function getBrowserName() {
if(navigator.userAgent.toLowerCase().indexOf('firefox') > 0) return "firefox";
}

var modifierMap = {
16:'shiftKey',
18:'altKey',
Expand Down