10

My question is in the title: does OS X allow to set a shortcut with backspace, like Ctrl+Option ⌥+Command ⌘+backspace (in my case to an Automator service)?

Edit:
You might think "Try it yourself"; well, I did it. In System Preferences → Keyboard → Shortcuts, I tried to add this shortcut to my service and it doesn't work. The problem seems to be with backspace. Ctrl+Option ⌥+Command ⌘+m works well.

Does anybody know a workaround that allows me to use the backspace key in a keyboard shortcut?

  • If you want, you can add your findings as an answer to keep the site organised. – Saaru Lindestøkke Oct 30 '13 at 20:29
  • Actually my question was to know if there was maybe a work around for this. – Matthieu Riegler Oct 30 '13 at 20:32
  • Ah sorry, I misunderstood. I thought you just wanted to know if the shortcut could include the backspace key or not. – Saaru Lindestøkke Oct 30 '13 at 21:09
6

To change the shortcut of a service, run plutil -convert xml1 ~/Library/Preferences/pbs.plist, open the plist, and change for example

<key>(null) - Some Service - runWorkflowAsService</key>
<dict>
    <key>key_equivalent</key>
    <string>@~a</string>
</dict>

to

<key>(null) - Some Service - runWorkflowAsService</key>
<dict>
    <key>key_equivalent</key>
    <string>@~&#x8;</string>
</dict>

Then restart to apply the changes.

@ is command, ~ is option, and &#x8; is delete (Windows backspace). Forward delete (Windows delete) would be &#x7f;. The shortcut strings use the same format as in DefaultKeyBinding.dict.

To change a global shortcut set in the App Shortcuts section, run plutil -convert xml1 ~/Library/Preferences/.GlobalPreferences.plist, open the plist, and change for example

<key>Some Menu Name</key>
<string>~@a</string>

to

<key>Some Menu Name</key>
<string>~@&#x8;</string>

Then quit and reopen applications to apply the changes.

Application-specific shortcuts are stored in ~/Library/Preferences/*.plist and ~/Library/Containers/*/Data/Library/Preferences/*.plist.

  • I don't know if yosemite treats this file differently, or if my issue is specific to chrome, but I cannot get this to work. Saving the file with the new key binding doesn't propagate to the keyboard shortcut preferences, nor does it show up in chrome's menu. A warning to hotkey-heavy folks like myself, I have found a lot of difficulty trying to customize my keyboard shortcuts throughout OSX (coming from windows & linux). Although it seems as though there is a lot of opportunity for fine-grained customization, I'm finding a ton of bugs within OSX keybindings as a whole. – aaaaaa Sep 25 '15 at 18:10
  • Note that you must remove or re-assign any other bindings to the same keys, otherwise it will not work – wrossmck May 9 at 16:40
0

While it's not free, Keyboard Maestro will solve your problem.

Here's a very simple example: Just set the Hot Key to ⌘Delete (by pressing ⌘+⌦) and assign a menu item for it to activate. You can also specify the applications that the shortcut will work in, so you can reuse the trigger.

Keyboard Maestro Macro

Of course, given that's it's a very powerful macro program, you can set it to do much more complicated tasks—from running Applescripts to manipulating Markdown.

0
  • Step 1 - get karabiner (if it's not already on your mac, which it might be).
  • Step 2 - open Karabiner
  • Step 3 - go to "change backslash key"
  • Step 4 - click "change backslash to forward delete / + (Fn+backslash to backslash"
  • Step 5 - close window.

This makes the backslash key the delete key. I never use backslash, so it works great for me. Hope this helps.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .