I use Mac (Mountain Lion, aka, OS X 10.8) Mail with Microsoft Office 365 at work and from time to time, I shoot myself in the foot by accidentally clicking Command-Option-Delete on a selected message(s).
The undesired outcome – the message(s) is gone forever – it is not in Trash folder, not in “Deleted Items” folder on the Office 365 Exchange server and not even in “Recover Deleted Items” context menu on “Deleted Items” folder. There is no confirmation dialog (as designed) and the action cannot be undone.
I think this happens to me because I frequently use Command-Shift-Delete to empty the Trash folder and Command-Option-0 to see Mail Activity window (it takes a while to sync between Microsoft Office 365 exchange server and local Mail app). The Command-Option-Delete combination is too close to the other two that I use frequently.
Yesterday, I ended up nuking an important message from my CTO at work and decided enough is enough.
My goal is to reassign Command-Option-Delete to something benign in the Mail app.
I tried going into System Preferences > Keyboard > Keyboard Shortcuts > Application Shortcuts and added an entry for Mail app (use the + button to bring up a list of applications to choose from). I typed in “Message Viewer” (that’s the benign action I picked because message viewer is always open and hence, Command-Option-Delete would do nothing but momentarily highlight the Mail app menu). However, when I got to the keyboard shortcut assignment field, I realized I cannot “type” the Delete key into that field. Hmm….
Some Googling later, I came across two posts on the venerable Stack Exchange network – the first post gave me a sense of how to specify Delete key on keyboard shortcuts (hint: you need to use the command line) and the second post showed me how to get settings into the Mail app via command line.
Steps to make Command-Option-Delete benign in Mac Mail app:
- Launch the Terminal application to get to a command line (/Applications/Utilities/Terminal.app)
- Type the following command and press <Enter>.
defaults write com.apple.mail NSUserKeyEquivalents -dict-add "Message Viewer" "@~\U0008"
- If you are curious, @ = Command key, ~ = Option key and \U0008 is the Delete key.
- Close and re-open Mac Mail app (if it was open, when you did step 2 above)
- In Mac Mail app menu, navigate to Window > Message Viewer. You should see Command-Option-Delete is assigned to this action.
Happy feet!!