Disable hardwired chrome hot key ctrl+w?

Only solution that worked for me was to rebind ctrl+w to some extension keyboard shortcut.

  1. go to chrome://extensions

  2. at bottom right look for keyboard extensions

  3. add ctrl+w as shortcut to any chrome extension you like.

Now, ctrl+w does not close the browser tab.


It's extremely annoying since Ctrl+W is the vim equivalent of Ctrl+Backspace. I wrote this little Tampermonkey script to temporarily place an event listener on the page unload event:

// ==UserScript==
// @name       disable ctrl+w
// @namespace  http://use.i.E.your.homepage/
// @version    0.1
// @description  disable ctrl+w
// @match      http://*/*
// ==/UserScript==

document.addEventListener('keydown', function(evt){

    // NOTE: ctrl key is sent here, but ctrl+W is not
    if (evt.ctrlKey) {

        var stopEvilCtrlW = function(e) {
            return "Oopsies, Chrome!";
        },  clearEvilCtrlW = function() {
            window.removeEventListener('beforeunload', stopEvilCtrlW, false);  
        };

        setTimeout(clearEvilCtrlW, 1000);
        window.addEventListener('beforeunload', stopEvilCtrlW, false);
    }

}, false);

The ctrl+w key is used in the nano editor on linux systems. When using crosh in Google chrome this key combination results in a prompt to close the current window.

Try using ctrl+alt+w

Works for me when connecting to remote systems via ssh using crosh.