-
-
Save dsturm/5213641 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ==UserScript== | |
// @name anti key-grabber | |
// @version 1 | |
// ==/UserScript== | |
document.addEventListener('keydown', function(e) { | |
// only if Command key is pressed | |
if (!e.metaKey) { | |
return; | |
} | |
switch (e.keyCode) { | |
case 188: // , (comma) - open settings | |
case 87: // W - close window | |
case 84: // T - open tab | |
case 76: // L - focus awesome bar | |
case 74: // J - open downloads panel | |
e.stopImmediatePropagation(); | |
break; | |
} | |
}, true); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment