Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Note: I tried searching first for a duplicate but didn't find any, so apologies if my search failed.

I just accidentally pressed the combination again and lost some work. I like using CTRL+W for individual windows, but I never want to close everything.

share|improve this question

2 Answers 2

up vote 6 down vote accepted

You can use AutoHotkey to intercept the keyboard shortcut:

SetTitleMatchMode, Regex

#IfWinActive, (- Google Chrome)$
    ^+w::
        ;do nothing
        return

#IfWinActive
share|improve this answer
1  
thanks! worked like a charm. Now adding it to my startup programs as well. –  Dez Mar 15 '12 at 17:04
1  
This example did not work for me with AutoHotKey v1.1.09.02. After some tweaking I got this working: #IfWinActive, ahk_class Chrome_WidgetWin_1 ^w::Return #IfWinActive –  Steven Devijver Jan 19 '13 at 21:45

The answer by iglvzx doesn't work for newer versions of AutoHotKey. Here is how you can do it with newer AHK versions:

SetTitleMatchMode, Regex

#IfWinActive, ahk_class Chrome_WidgetWin_1
    ^+w::
        ;do nothing
        return
    ^+q::
        ;do nothing
        return

#IfWinActive

This also prevents Ctrl+Shift+Q from quitting all of Chrome.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.