Skip to content

Instantly share code, notes, and snippets.

@dsturm
Forked from rodneyrehm/anti-keygrabber.user.js
Created March 21, 2013 14:51
Show Gist options
  • Save dsturm/5213641 to your computer and use it in GitHub Desktop.
Save dsturm/5213641 to your computer and use it in GitHub Desktop.
// ==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