Skip to main content
replaced http://superuser.com/ with https://superuser.com/
Source Link

Basically copying answer from superuser.comsuperuser.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;
});

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;
});

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;
});
added 28 characters in body
Source Link
janot
  • 336
  • 2
  • 16

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''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;
});

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

It's Greasemonkey script. 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;
});

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;
});
added 9 characters in body
Source Link
janot
  • 336
  • 2
  • 16

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

It's userscriptGreasemonkey script. 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;
});

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

It's userscript. 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;
});

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

It's Greasemonkey script. 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;
});
Source Link
janot
  • 336
  • 2
  • 16
Loading