Skip to main content
4 of 4
replaced http://superuser.com/ with https://superuser.com/

Basically copying answer from superuser.com linked by Tom Woodward in comments. I've only changed keycode and url.

It's Greasemonkey script which disables "T" shortcut. Supported by major browsers (extension like Greasemonkey for Firefox/Tampermonkey for Chrome may be needed/useful).

// Your code here...

// ==UserScript==
// @name           Disable keyboard shortcuts
// @description    Stop websites from highjacking keyboard shortcuts
//
// @run-at         document-start
// @include        *github.com*
// @grant          none
// ==/UserScript==

keycodes = [84] // Keycode for 'T', add more keycodes to disable other key captures

document.addEventListener('keydown', function(e) {
//    alert(e.keyCode); //uncomment to find out the keycode for any given key
    if (keycodes.indexOf(e.keyCode) != -1)
    {
        e.cancelBubble = true;
        e.stopImmediatePropagation();
    }
    return false;
});
janot
  • 336
  • 2
  • 16