0

I know the defaults:

  • control+shift+power : Lock screen
  • command+space : Spotlight

I do NOT want to change these -- they must continue to work.

However, due to severely ingrained muscle memory and the fact that I work on many other sensitive systems in the same day, I need to create two new shortcuts that do the same thing:

  • command+L (or similar) : Lock screen
  • control+space : Spotlight

How can this be accomplished on OS X? (simple settings change, or editing DefaultKeyBinding.dict , or via 3rd party software )

1

You can use KeyRemap4MacBook to map key combinations to other key combinations:

<autogen>__KeyToConsumer__ KeyCode::L, VK_COMMAND | ModifierFlag::NONE, ConsumerKeyCode::EJECT, ModifierFlag::CONTROL_L | ModifierFlag::SHIFT_L</autogen>

<autogen>__KeyToKey__ KeyCode::SPACE, VK_CONTROL | ModifierFlag::NONE, KeyCode::SPACE, ModifierFlag::COMMAND_L</autogen>

See the source for the key code values and predefined settings.

1
  • Works well for the most part... but not with Synergy :( – Preston PHX May 16 '13 at 21:43
0
  1. First things first:

    • First: The shortcut for Sleep, or Lock Screen is actually Shift-Cmd-Eject (topmost right key on laptops and Bluetooth Apple-supplied keyboards, top right key on full size USB keyboard).

    • Second: Cmd-Space is the easiest shortcut to use for Spotlight. You cannot just apply a single key to the shortcut like you can in games.

  2. That being said, I would suggest using Cmd-Opt-Ctrl-Shift-Z (or -X) for Sleep

    • Go into System Preferences (>System Preferences...) and navigate to the Keyboard Shortcuts pane (>System Preferences...>Keyboard>Keyboard Shortcuts)

      • After testing this, I realized that you actually cannot change the default shortcut for Sleep. However, I do know after testing that there is a shortcut to Shut Down, even though it's not listed on the menu list: Cmd-Ctrl-Opt-Function (bottom right on laptops and Bluetooth Apple-supplied keyboards, in the middle island of six keys on the full size keyboard)
    • Apple actually does not allow you to have more than one shortcut for each function, otherwise that could possibly cause confusion and/or become a controversy with shortcut on installed applications.

I wish you the best of luck.

-Frazier

2
  • Control-shift-power / control-shift-eject is the shortcut for display sleep. And you can change the Spotlight shortcut to just a single F-key. – Lri May 15 '13 at 8:57
  • @LauriRanta On the laptops, Command-control-function-option is for computer sleep, and I didn't know you could change spotlight... – anorak May 17 '13 at 4:23

You must log in to answer this question.

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