- Code: Select all
// Hotkeys
document.addEventListener('keydown', function(e){
if(e.shiftKey && !e.ctrlKey && e.altKey){
switch(e.keyCode){
// Edit styles with Alt+Shift+E
case 69: editStyles(); break;
// Unblock elements with Alt+Shift+U
case 85: unblockEle(); break;
// Block element with Alt+Shift+B
case 66: blockEle(); break;
// Unblock latest element with Alt+Shift+L
case 76: unblockEle(true); break;
// Block elements (don't use nth-child) with Alt+Shift+W
case 87: blockEle(true); break;
}
}
}, false);
The Alt key is the problem. I guess the Alt/Option key on a Mac keyboard is not the same as the Alt key for Windows. What name would I give to have that key recognized?
UserAgent: Mozilla/5.0 (Macintosh; U; Intel Mac OS X; rv:1.9.2.11) Gecko Firefox/3.6.11

