1

On my Macbook pro (OS X 10.8.2) the hotkey combo to lock he screen is Ctrl+Shift+Eject.

I don't like that combination at all. I'd like to make it Ctrl+Command+l is there some way to do this?

0

Using KeyRemap4MacBook, you could add this to private.xml:

<autogen>--KeyToKey-- KeyCode::L, VK_CONTROL | VK_COMMAND, KeyCode::VK_CONSUMERKEY_EJECT, VK_CONTROL | VK_SHIFT</autogen>

  • I installed KeyRemap4MacBook. I added this to private.xml. I rebooted. However it doesn't seem to do anything. No new options appear and Ctrl+Command+l does nothing. – Jistanidiot Jan 7 '13 at 19:27
  • Ok so I found the problem. Your code is incomplete. You need a buch of other xml stuff <?xml version="1.0"?> <root> <item><name>Lock Screen with Ctrl+Command+l</name> <identifier>private.locksreen</identifier> <autogen>--KeyToKey-- KeyCode::L, VK_CONTROL | VK_COMMAND, KeyCode::VK_CONSUMERKEY_EJECT, VK_CONTROL | VK_SHIFT</autogen> </item> </root> – Jistanidiot Jan 7 '13 at 19:41
0

I would suggest :

  1. Create a new service with automator with a "Run Shell Script"
  2. Here the script /System/Library/CoreServices/Menu\ Extras/User.menu/Contents/Resources/CGSession -suspend
  3. Bind this new service to a keyboard shortcut in System Preferences » Keyboard » pane Keyboard Shortcuts

Edit : This post on SuperUser explains it better than me.

You must log in to answer this question.

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