Take the 2-minute tour ×
Ask Different is a question and answer site for power users of Apple hardware and software. It's 100% free, no registration required.

In Addressbook I want to create a keyboard shortcut for the Menu entry Delete Group using the key combination option-command-delete.

So I went to System Preferences --> Keyboard --> Keyboard Shortcuts and added an app-specific shortcut entry for "Delete Group". But when I tried to assign the key combination option-command-delete, my input wouldn't get accepted. (Combinations with letter like option-command-D work, though.)

How can I enter a shortcut combination involving the delete key?

share|improve this question

1 Answer 1

up vote 2 down vote accepted

You can edit the property list that stores the shortcuts directly. For example open ~/Library/Preferences/com.apple.AddressBook.plist with TextMate or TextWrangler, and add:

<key>NSUserKeyEquivalents</key>
<dict>
    <key>Delete Card</key>
    <string>~@&#x0008;</string>
</dict>

The shortcut strings are documented in http://www.hcs.harvard.edu/~jrus/Site/Cocoa%20Text%20System.html.

share|improve this answer
    
This is excellent! Thanks! I've tried it and it works brilliantly. Only things to add: (1) The code snippet has to go inside the most-outer <dict>...</dict> tag pair and (2) the text editor has to convert the binary plist file first into text format before you can edit it. –  halloleo Apr 2 '12 at 9:33
    
@halloleo I believe that if you use Xcode to edit the plist, you don't have to worry about converting between binary and text formats. If you don't have Xcode, you can use defaults write $path_to_plist NSUserKeyEquivalents -dict-add "$command_name" "$shortcut_string". –  Blacklight Shining Nov 14 '12 at 6:46

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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