youtube icon indicating copy to clipboard operation
youtube copied to clipboard

[Feature Request] Set shortcut to disabled / no keystroke.

Open SteegHobland opened this issue 6 years ago • 2 comments

The default shortcuts can be redefined, but I don't see any way to disable them, or set them to no keystroke at all. I'd like to be able to do that.

SteegHobland avatar Sep 13 '20 22:09 SteegHobland

Hi!, https://stackoverflow.com/a/24764878 I added a simple button, and tested its functionality in the browser console.

//Button placed above the video description document.getElementById("description").insertAdjacentHTML("beforebegin", "<button onclick='keys();' style='width: 50mm; height: 10mm; background-color: #c00; border: none; color: #fff'> <b> DISABLE KEYS </b></button>");

//function that disables shortcuts
function keys() {
window.addEventListener("keypress",
function (e) { 
    e.stopPropagation(); 
}, true);
window.addEventListener("keydown",  
function (e) {
     e.stopPropagation(); 
    }, true);
window.addEventListener("keyup", 
    function (e) { 
        e.stopPropagation(); 
    }, true);
} 

TomasDmArg avatar Oct 13 '20 02:10 TomasDmArg

Feature already exists (At least now). To disable a shortcut, click on the shortcut and press empty.

hboyd2003 avatar Oct 04 '22 21:10 hboyd2003