Skip to content

Instantly share code, notes, and snippets.

@maxw3st
Forked from rodneyrehm/anti-keygrabber.user.js
Last active December 15, 2015 06:08
Show Gist options
  • Save maxw3st/5213668 to your computer and use it in GitHub Desktop.
Save maxw3st/5213668 to your computer and use it in GitHub Desktop.
// ==UserScript==
// @name anti key-grabber
// @version 1
// ==/UserScript==
// original script by @codepo8 Christian Heilman
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