Disable the Command-Backspace "Move to trash" keyboard shortcut

I use Preview to view PDF files (duh) and sometimes annotate them as well as search them profusely. I keep using the Command-Backspace combination to try to delete the current line I'm writing in the annotation or to clear the search box, but to my dismay it sends the currently open PDF file to the trash!

I'm used to Command-Backspace deleting the whole line in other, more write or text-input oriented, software, such as TextEdit even (which I don't really use, but it is another OSX default, so I'd think some consistency is to be expected?) .

Is there any way to disable this keyboard shortcut in Preview? I don't even need it to do what I expect it to, I just want it to stop deleting my files!


Solution 1:

In System Preferences > Keyboard > Keyboard Shortcuts, add a shortcut for Preview (Move Selected PDF Document to Trash) that you are unlikely to type inadvertently, something like ^ ⌥ ⇧⌘ ⎋.

Add Preview Keyboard Shortcut

Solution 2:

As an alternative to assigning a different (difficult) shortcut to the menu item, you can assign the Cmd-Delete combination to a harmless menu item, such as Edit » Spelling » Check Spelling as You Type.

The difference is, something harmless happens when you press your shortcut, but no matter what unlikely combination of keys you press, it will never perform the delete operation.

Additionally, the answer with the difficult shortcut only works for the specific PDF menu item variant, not on all variants of the item (e.g. Move Selected Image to Trash). It depends on which behavior you prefer.


The problem is: It's not possible to type Delete/Backspace in the dialog where you assign custom shortcuts. You need to do this via the command line in /Applications/Utilities/Terminal.app:

defaults write com.apple.Preview NSUserKeyEquivalents -dict-add "Check Spelling as You Type" "@\U0008"

The result:

alt text


Many thanks to @Arjan for his collaboration on this completely revised answer.