September 6th, 2011 • 6:21 pm
When I installed Lion and started using it, one of the first things I noticed is that command-D no longer worked as a shortcut for the “Don’t Save” button in the dialog box you get when you attempt to close an unsaved document.
At first, I thought it was a bug. But I soon realized that there was a reason for this, which is that, as we saw yesterday, due to the implementation of the Auto Save feature in Lion, the dialog itself has changed and is now a dialog that combines the original dialog box with the question about whether you want to save the unsaved document and the traditional options of a “Save As” dialog box in the same user interface. (In Snow Leopard, there were two different steps when you tried to close an unsaved document. First there was a dialog which asked you if you wanted to save or not, and then, if your answer was yes, there was a second dialog that was the standard “Save As” dialog. The command-D shortcut worked for the “Don’t Save” button in the first of the two dialog boxes.)
Because of this change, the new dialog now offers the option to select the destination for saving the file, and of course, for that option, the command-D shortcut is already a commonly used one, which directly selects the Desktop as the destination. So you cannot have the same command-D shortcut for two different things in the same dialog box.
As is documented on various web sites, the new shortcut that Apple chose for the “Don’t Save” button in that dialog is command-Delete.
The problem with this new shortcut is that it requires two hands. People might argue that either you were using the mouse to close the document, and then you can use the mouse to click on the “Don’t Save” button as well, or you were using the keyboard (command-W) to close the document, and then you can easily type a shortcut that requires two hands.
The reality is not that simple. I often find myself with one hand (my left hand) on the keyboard and the other (my right hand, because I am right-handed) on the mouse. I use the mouse in my right hand to click on the document to bring it to the foreground, because it’s quicker than cycling through windows with the keyboard, and then I use command-W with my left hand to close the document window.
The new shortcut makes this impossible.
I can try to get used to lifting my right hand from the mouse and moving it to the keyboard for this, but it won’t be easy. I think I prefer another solution.
One would be to use Full Keyboard Access (which is always on on my machine) to tab through all available controls in the dialog box in order to put the focus on the “Don’t Save” button:
I can then just press the Space bar to activate the button. But this still requires multiple keystrokes and is a bit error-prone.
My preferred solution is to use Keyboard Maestro to intercept the desired shortcut and make it work the way it used to.
Of course, due to limitations related to the architecture of Mac OS X itself, Keyboard Maestro can only have macros with shortcuts that apply to a specific application, a specific group of applications, all applications, or all applications except for a specific group of applications. Since this “Don’t Save” button appears in a number of different applications, I have to decide whether I want to create a macro with a universal shortcut or limit myself to specific applications.
If I choose to create a universal macro, this means that I have to choose a new shortcut that will not interfere with other commands in my applications that might use this shortcut within the context of their specific application. This might require quite a bit of testing.
Instead, I have decided that, for now, I’d rather just create a macro for the applications where I encounter the dialog most often, i.e. Pages ’09, Numbers ’09 and TextEdit. For these three applications, I now have a macro that intercepts the command-shift-D shortcut and sends the command-Delete shortcut to the application instead.
It works like a charm. It means that I cannot use command-shift-D for anything else in these applications, but right now command-shift-D has no meaning in Numbers ’09 and TextEdit and in Numbers ’09, it brings up a palette that I never use, so I don’t really care.
That’s my solution for now. There is a site that mentions a Terminal command to restore the command-D shortcut in Lion, but it doesn’t work for me. In any case, I don’t really want to lose command-D as a shortcut for the Desktop. So command-shift-D it is for me, thanks to Keyboard Maestro. And I can type it with just my left hand, which means I don’t have to change the way I used to work (with my left hand on the keyboard and my right hand on the mouse).
UPDATE: A reader kindly reminded me that my keyboard also has a Command key on the right-hand side of the space bar, which makes it possible to press the command-Delete with one hand. It’s true, but it’s quite awkward in my situation, where I have to move my left hand all the way to right to press the two keys. (I personally never use these modifier keys on the right.) I am not saying it’s impossible to adjust to, but I still prefer my solution with a different shortcut that does not conflict with command-D and is pretty much as easy for me to type as command-D was, with my left hand on the left hand side of the keyboard, where it resides naturally.
Another reader describes the two-hands requirement as a “feature” rather than a bug, as it helps avoid situations where you accidentally pressed command-D and lost all unsaved changes when you didn’t mean to. First of all, this is somewhat contradicted by what the other reader says, which is that you can still do it with one hand (albeit more awkwardly, at least in my opinion, except possibly if you are left-handed). But it is also a situation that I don’t remember ever experiencing myself. That might be because I am a compulsive saver and I am not someone who tends not to pay attention to what a dialog box says simply because I have no patience with dialog boxes. Maybe it helps this kind of user avoid irreparable loss of data, but I personally am not worried about losing unsaved data because my new, more convenient custom command-shift-D shortcut can be pressed with one hand almost as easily as command-D could be.
In addition, I find it a bit odd, given what Auto Save seems to have as a general goal, that an irreparable loss of data might still happen. In fact, I have noticed that, when you quit an application such as TextEdit with an unsaved document window open, TextEdit is perfectly able to restore the window with its contents when you relaunch it. So Auto Save does save the data even if the document has never been saved (and given a name). But it’s true that if you try to close an unsaved document and then hit the “Don’t Save” button, you will lose the unsaved data. Maybe the solution here would be to make the “Don’t Save” action itself undoable. After all, Auto Save does save the data, as the quit-relaunch operation demonstrates. So why not make the “Don’t Save” operation undoable? That would make the Auto Save approach even more consistent as far as I am concerned, and eliminate the worry about the “Don’t Save” keyboard shortcut being too easy to press.