up vote 2 down vote favorite
1
share [g+] share [fb]

In my favorite editor (vim), I regularly use ctrl-w to execute a certain action. Now, it quite often happens to me that firefox is the active window (on windows) while I still look at vim (thinking vim is the active window) and press ctrl-w which closes firefox. This is not what I want. Is there a way to stop ctrl-w from closing firefox?

Rene

link|improve this question

69% accept rate
Happens to me too every now and then because in IntelliJ IDEA Ctrl-W means something else and gets used a lot... – Jonik Nov 3 '09 at 20:22
Ctrl/Cmd+W is supposed to close the current window/tab on all OS. In fact this is an accesibility bug in IntelliJ products and it already have a bug opened at youtrack.jetbrains.net/issue/… – Sorin Sbarnea Sep 15 '11 at 13:19
feedback

migrated from stackoverflow.com Nov 3 '09 at 20:14

This question came from our site for professional and enthusiast programmers.

4 Answers

Firefox can be configured not to close the window when you close the last tab. Use about config to set browser.tabs.closeWindowWithLastTabto false.

If you don't even want firefox to close tabs with C-t, then you'll have to use something like keyconfig to change the shortcut.

link|improve this answer
Can you garantee it's not malware or something like that? The webpage is obscure, points to a huge forum thread, doesn't say the licence and doen't show the source code. I only found the binary to install... – user39559 Sep 8 '10 at 9:30
What webpage are you talking about? – Ryan Thompson Sep 11 '10 at 1:16
feedback

Keyconfig extension <-- Could be what your looking for. It lets you change the keyboard bindings in Firefox.

link|improve this answer
Can you garantee it's not malware or something like that? The webpage is obscure, points to a huge forum thread, doesn't say the licence and doen't show the source code. I only found the binary to install... – user39559 Sep 8 '10 at 9:31
feedback

You could write a universal greasemonkey script that embeds a Flash SWF into the page that intercepts keystrokes.

Then again, you're probably not looking for a programmatic solution. Try SuperUser.

link|improve this answer
feedback

Ctrl-W = Close Tab. It closes the browser when no tabs are left. Open a new blank tab, and it shouldn't cause the whole browser to close (just that tab).

link|improve this answer
I assume that closing any tab is not appreciated by the question asker? – Arjan Nov 3 '09 at 21:50
Opening a new tab will help there aswell. Unless he presses it twice. – Macha Nov 3 '09 at 23:04
feedback

Your Answer

 
or
required, but never shown

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