TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

⌘Q is too damn close to ⌘W

226 pointsby sprsquishover 14 years ago

41 comments

thought_alarmover 14 years ago
The reason it's not normally a problem is that if you're working on a document and you hit ⌘Q (or ⌘W for that matter) you will be prompted to save your changes.<p>However, this does become a problem in web browsers and file browsers where there are no changes to save.<p>Apparently in the early days of OS X the NEXTSTEP guys wanted to add a ⌘Q shortcut to Finder, which would log you out of OS X. As the story goes, some people at Apple really hated that idea, so after some lively debate they settled on ⌘⇧Q instead. (As a bonus, it's now a global shortcut, so you don't have to be in Finder to use it.)<p>Similar problem with web browsers. You can give it a different shortcut, or you can enable a prompt to warn when closing multiple tabs. Most people opt for the latter.
评论 #1886536 未加载
评论 #1885744 未加载
评论 #1886269 未加载
评论 #1886399 未加载
dedwardover 14 years ago
Most browsers warn you if you are about to close multiple tabs.... I guess chrome doesn't? Weird.<p>That would be an implementation problem for chrome - every other OSX application tends to properly warn you if you are about to close multiple context windows with cmd-q.<p>EDIT: Just researching a bit- this seems to be a conflict between the Chromium design goals and the OSX UI guidelines... the Chrome team absolutely refuses to add a warning dialog if you try to close multiple tabs, but it would be the expected behaviour on OSX.<p>I tend to fall on the side of OSX - part of what makes it great is UI consistency - and this is one case where Chromium is making things worse, not better.
评论 #1885461 未加载
评论 #1886520 未加载
jemfinchover 14 years ago
Do people really not know that Chrome has an option to reopen itself with the tabs you had open last? Preferences &#62; Basics &#62; On Startup &#62; Reopen the pages that were open last.
评论 #1885173 未加载
评论 #1885172 未加载
评论 #1885268 未加载
评论 #1885294 未加载
评论 #1887880 未加载
评论 #1885743 未加载
评论 #1885511 未加载
评论 #1887660 未加载
评论 #1888676 未加载
sligover 14 years ago
Latest chrome (9.x dev) has an option in "about:flags" to show you a kind of confirmation box before quitting.
评论 #1885286 未加载
martingordonover 14 years ago
I've had this happen to me in Chrome a few times recently (I switched to Chrome full time a few weeks ago), but I've never had it happen in Safari since Safari prompts you if you have multiple tabs/windows open.
评论 #1885204 未加载
megrimlockover 14 years ago
What's really needed here is not more distance between hotkeys, but instead universal lightweight undo for user interactions.<p>The most precious resource is the user's time. There should be no interaction that irreversibly discards the user's work. We have fairly universal undo for editing operations; there should be just as much undo support for closing windows, tabs, or apps -- carefully constructed artifacts of the user's workflow.
评论 #1885515 未加载
katovatzschynover 14 years ago
"The Opposite of Fitts' Law - The Ejector Seat Analogy"<p><a href="http://www.codinghorror.com/blog/2010/03/the-opposite-of-fitts-law.html" rel="nofollow">http://www.codinghorror.com/blog/2010/03/the-opposite-of-fit...</a>
kamechanover 14 years ago
no keymap is without its annoyances. in DVORAK, ⌘w is right next to ⌘v (paste). i close windows all the time :(
评论 #1885170 未加载
scott_sover 14 years ago
In vi, I use control+w to shift between the sections of a split window. You can imagine the hilarity that used to ensue. But, it's not an issue anymore. I haven't made that mistake in well over a year.
评论 #1885174 未加载
评论 #1885757 未加载
mhdover 14 years ago
German hackers represent: On a German keyboard on Windows or Linux, you have to enter a few characters with the right Alt key (the "AltGr" key). This includes the "@" sign, which is located on the "Q" key. A lot of first-time switchers thus cause their browser to close every time they try to enter an email address.<p>Incidentally, the "@" sign, as many other characters, is on a different key on the German Mac layout. Never understood why e.g. the US layout stays the same on every system, but the German one doesn't. Good time that I switched to the US one long ago. Now I only have to fight with different ways to access umlauts…
tedgeover 14 years ago
With a bit of practice, you can train your hand to do ⌘-W as a 3-finger "chord" by touching your middle finger to the 'Q' key before allowing your index finger to depress the 'W'.
erikanoover 14 years ago
I'm using Firefox and Vimperator [1] with a TypeMatrix EZ-Reach 2030 [2] mapped to US-Dvorak under FreeBSD 8.1 with xmonad [3] + xmobar [4].<p>This means that:<p>- When my fingers are resting on the home row, they are on keys <i>a, o, e, u</i> and <i>h, t, n, s</i>.<p>- When I want to close a tab in Firefox, I press <i>d</i>, which is left of <i>h</i>.<p>- When I want to quit Firefox completely, I press <i>:q</i>.<p>I can't remember the last time I closed a tab I didn't want to close or exited Firefox without meaning to do so. The only problem I had for a while, was that I started "record macro" with <i>q</i> when I meant to scroll with <i>j</i> - that hasn't happened for quite some time now.<p>I mostly only use Chromium if I am logged in on various sites in Firefox and I need to use my server as proxy to access a web service bound to 127.0.0.1 on the server (meaning that it is not publicly accessible), while also using the sites I am logged in on in Firefox. I always quit Chromium by closing all tabs, and as mentioned by others, <i>Ctrl+w</i> is far away from <i>Ctrl+q</i>.<p>[1]: <a href="http://vimperator.org/vimperator" rel="nofollow">http://vimperator.org/vimperator</a><p>[2]: <a href="http://typematrix.com/ezr2030/" rel="nofollow">http://typematrix.com/ezr2030/</a><p>[3]: <a href="http://xmonad.org/" rel="nofollow">http://xmonad.org/</a><p>[4]: <a href="http://hackage.haskell.org/package/xmobar" rel="nofollow">http://hackage.haskell.org/package/xmobar</a>
zaiusover 14 years ago
I use this to map it to ⌘⇧Q<p>defaults write com.google.Chrome NSUserKeyEquivalents '{"Quit Google Chrome"="@$Q";}'
limmeauover 14 years ago
On German Windows keyboards, @ is on right-Alt-Q. Recently, I had a (Windows-trained) guest who wanted to write an email on my Mac, but Firefox kept "crashing".
ewjordanover 14 years ago
Huh. I guess that's true, for some reason I've never noticed it before.<p>I usually keep my left hand on my "home keys" when browsing (Firefox user here), in order from pinky to thumb, q-w-e-f-⌘, of which I use w, f, and ⌘ on a regular basis, and I guess that usually keeps me from mis-hitting q when I mean w, I'd actually have to push the wrong finger, which is pretty rare.<p>Right thumb goes on the trackpad for mouse interactions (much easier now that the MBP trackpad presses in rather than having a button), other four fingers on that hand go on j-k-l-; (⌘+j/k/l I use all the time for downloads/search/address bar, ; is wasted, of course). Scrolling is the only thing that sucks, but you can get pretty far with space/shift+space (hit space with left thumb, shift with right pinky).<p>If I had a problem with this, I'd probably go with the WoW shortcut for quitting, alt+command+Q, which is pretty hard to do accidentally (Double-thumb keypress? Expert move...) and doesn't tend to be bound to anything else. Command+1 seems like a bad idea because some of us are very used to Command+(number) to switch to tabs.
Argorakover 14 years ago
Huh? I never had that problem and do actually like it that way. Train yourself to use the middle finger for "W" and the ring finger for pressing "Q" and the problem vanishes. It will still happen to you perhaps once per month, but I can live with that.
评论 #1886350 未加载
jrockwayover 14 years ago
C-x C-c is too close to C-x C-b.
评论 #1885210 未加载
评论 #1885348 未加载
评论 #1885199 未加载
cookiecaperover 14 years ago
This has bitten me several times and it really sucks. The "Restore Tab" function doesn't restore the state of Flash applications and it doesn't restore content in some input boxes (like those on Facebook, because they are hidden by JS initially).<p>If you're in Private Browsing mode and this happens, you lose the whole session forever, and that just happened to me the other day. It was really frustrating. :(
jolanover 14 years ago
In Chrome, I just use Ctrl+Shift+T when this happens.
评论 #1885117 未加载
meelashover 14 years ago
I've never had this happen to me if I recall. Do the people who have a problem with this not keep their hand in "typing position"? It seems really difficult to me, with my left hand in position (which can be assured with the F dot) to hit W with my pinky or Q with my ring finger.
d0mover 14 years ago
In theory maybe but in practice I've never typed cmd+q instead of cmd+w. (A little bit like I've never typed ctrl+a (which select all) instead of ctrl+s (which save)).<p>However, I've pressed f1 instead of escape a couple of time so I make sure to bind f1 to escape in vim
评论 #1885438 未加载
FluidDjangoover 14 years ago
That's why for applications that I do not want to quit easily I set "Application (keyboard) Shortcuts" [ OS X ] to require something less commonly used (like cntl-opt-cmd-Q) for quitting. [ OS X System Preferences -&#62; Keyboard ]
wdr1over 14 years ago
This doesn't seem to work for me using Firefox on Snow Leopard. The menu changes to the crazy keyboard shortcut I give to Quit (and sure enough the crazy combo works as well), however Cmd-Q <i>still</i> quits Firefox as well.
评论 #1885731 未加载
ankushnarulaover 14 years ago
FWIW... This is a useful resource when trying to remap shortcuts in Safari. I used it to remap Cmd-L to "Google Search..." to better mimic Chrome.<p>file:///Applications/Safari.app/Contents/Resources/Shortcuts.html
arohnerover 14 years ago
My real problem is that M-w is too close to ⌘-w, especially when I have meta mapped to ⌘ on my external keyboard.<p>I would really love to have a consistent set of shortcuts across emacs and everything else I use.
edge17over 14 years ago
I think the worst design decision was putting the print button next to the save button. I've definitely sent code files in excess of 50k lines to some unknown printer before by accident.
评论 #1885905 未加载
dmazover 14 years ago
Chrome for Linux addresses this by using Ctrl+Shift+Q.
mcritzover 14 years ago
This is like complaining that he keeps getting a spoonful of Cheerios up his nose every morning because his nostrils are too close to his mouth.
评论 #1885180 未加载
评论 #1885167 未加载
duopixelover 14 years ago
I'm willing to bet the author is either A) not a touch typist or B) Comes from Windows/Linux. It's not the author's fault, of course, but it has been around since 1984 and it's unlikely to change. The 'native' way to type commands on a Mac is using your thumb to press Command and your pinky to press Q, or your ring finger to press W.<p>It feels awfully weird pressing Q with your ring finger.<p>Window/Linux users use the pinky to press ctrl, taking your hand out of the usual touch typing position, and thus making it more prone to mistakes.
评论 #1886419 未加载
评论 #1885447 未加载
hexleyover 14 years ago
I could have sworn somebody made a SIMBL plugin years ago to provide confirmation for Cmd-Q in all apps...or am I just going crazy?
linhatover 14 years ago
well, this is not really a solution to his problem, but instead intended as an informational bit. i am actually using a dvorak(-programmers) layout. then the Q and W keys are quite far apart, with the Q key right above the left ⌘ key, and W right above the right ⌘ key, a really handy addition to an (already) awesome layout.
foenixover 14 years ago
I just did this to a blog entry after reading your post. I should have written in out in vim like I normally do.
shawnwallover 14 years ago
you just changed one of the consistent features of all os x applications, how to close applications and close windows/tabs of applications.<p>for some reason i always use the finger motion/press of thumb on left ⌘-key + index finger on q key to quit things and i've never experienced the ⌘q ⌘w issue.
评论 #1885339 未加载
kuroirover 14 years ago
It is indeed to close, but it's not worth it modify it since it's a system wide standard.
hippichover 14 years ago
Can you close tab with Ctrl-W in Mac (like in Ubuntu and Win)? If so - just use it. Ctrl-Q do not quit browser =)
jleesover 14 years ago
Good thing we're fixing this!
invertedlambdaover 14 years ago
Yes, yes and yes.
gmattyover 14 years ago
A F#$#@$* men
onkover 14 years ago
o is too close to 0.
stretchwithmeover 14 years ago
very true.
drivebyacct2over 14 years ago
I will give plenty of karma to anyone who can tell me an easy way of doing something even remotely similar in Linux. I'd love it.
评论 #1885326 未加载