Ask Different is a question and answer site for power users of Apple hardware and software. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'd like to press a key combo to get my computer to the lock screen. In Windows the shortcut was Windows key + L. On Mac I press CMD+ALT+Power which turns the laptop off and puts it into sleep. I want to just have it go to the lock screen with the monitor staying on.

share|improve this question
I think this question might help. – Ashley Jul 8 '13 at 0:33
up vote 38 down vote accepted

You can add the Lock Screen to your Menubar.

  • In Spotlight ( + Space) search for Keychain Access
  • Open Preferences ( + ,)
  • Check Show keychain status in menu bar This will show a lock in your Menu Bar with an option Lock Screen


  • System Preferences > Keyboard > Keyboard Shortcuts or Keyboard Tab
  • In the App Shortcuts or Application Shortcuts section, add a new item for All Applications with the Menu Title of Lock Screen and a Keyboard shortcut that you like. Example

This way you don't have to change your Screensaver timeout and you can lock your machine much like you do in windows. Note that You may also need to Logout and back in for any changes to the shortcut to take effect.

share|improve this answer
A small addition for Yosemite. To add the keyboard shortcut as in the second half of hoss' answer go to System Preferences -> Keyboard -> Shortcuts, click on App Shortcuts -> All Applications and then add the keyboard shortcut as above. – Ashutosh Jindal Sep 9 '15 at 8:11
Thanks, I have updated the answer to include the language change between versions. – hoss Sep 9 '15 at 20:13
A slight typing mistake .."Show Status in Menu Bar" should be "Show keychain status in menu bar". – Nandan Kaushik Dutta Oct 7 '15 at 7:07
Depends on the version of the OS, apple likes to change the language slightly between releases. However you are right, starting from at least 10.9 it was changed to 'Show keychain status in menu bar' – hoss Oct 7 '15 at 13:35
Another option that I use is the free quick launcher Alfred (free), which includes a Lock command. – tedmiston Jan 3 at 19:19

First, you should enable requiring the password when the screen saver or display sleep begins.

To do that go to

screenshot of Security & Privacy > General

Now, when you press the key combination control+shift+power (control+shift+ on some systems) to put the screen to sleep, it will also lock the screen.

share|improve this answer
Yeah, I don't want it blacking my screen and keyboard out. I thought I made that clear in the OP. – eveo Jul 9 '13 at 15:00

I have finally figured out how to do this:

pmset displaysleepnow

That will actually put the display to sleep without suspending the entire machine.

Amazing how hard it is to figure out how to do something so basic.

share|improve this answer
Finally, thank you very much. – eveo May 13 at 11:57
@eveo this is the same as control+shift+eject. Display sleep, but not computer sleep. – cde May 15 at 0:48

I use BetterTouchTool to do just this. Once downloaded and running:

  • Click the "Keyboard" tab and select "Global" in the left-hand "Select Application" pane
  • Click "+ Add new keyboard shortcut" at the bottom of the shortcut list
  • Click the "Keyboard shortcut" recording field and hold down the keys you wish to use for the shortcut, I use + L (which feels most like the Windows key + L on Windows systems)
  • Click the "Trigger predefined action" dropdown and select "Open application/file/script..."
  • Navigate to /System/Library/Frameworks/Screensaver.framework/Versions/A/Resources and select "" and click "Open"

Now hitting + L will trigger the screensaver (and lock the computer, provided you followed the advice in the answer from @Buscar 웃 above to require the password when the screen saver or display sleep begins). You can also set BetterTouchTool to launch when the computer starts so your hotkey always works.

share|improve this answer

Quoting myself from

  1. Download and install FastScripts (which is free for up to 10 keyboard shortcuts)

  2. Download and install LockScreen.scpt and save it to ~/Library/Scripts/ (you may have to create that folder if you haven't used it before.

  3. Assign the keyboard shortcut of your choice to LockScreen.scpt within FastScripts preferences:

FastScripts preferences screenshot

Note: while the OP did not want to sleep the screen display, that can easily be done too. Just download Sleep Display and install it to /Applications/ and use SleepAndLockScreen.scpt instead of LockScreen.scpt.

share|improve this answer

Logging out to the fast user switching screen:

  • Add a shell alias or a keyboard shortcut for /System/Library/CoreServices/Menu\ Extras/ -suspend.
  • Enable the fast user switching menu from the Users & Groups preference pane, and then select Login Window… from the menu.
  • Use the lock action in Alfred.

Locking the screen:

  • Check "Require password immediately after sleep or screen saver begins" in the Security & Privacy preference pane. You can then lock the computer manually by pressing control-shift-eject to turn off displays, by pressing option-command-eject to go to sleep, or by running open -a ScreenSaverEngine.
  • Enable the Keychain menu extra in the preferences of Keychain Access, and then select Lock Screen from the menu.
share|improve this answer

There is a wonderful tool Karabiner that can help you with this (and many more):

Properties->Misc&Uninstall -> private.xml

<!-- Place this file to ~/Library/Application Support/Karabiner/private.xml -->
        <name>Screensaver Lock screen (Ctrl-Cmd-L)</name>
        <autogen>__KeyToKey__ KeyCode::L, ModifierFlag::CONTROL_L | ModifierFlag::COMMAND_L,

Then activate the Screensaver Lock screen (Ctrl-Cmd-L) in the Change Key screen.

share|improve this answer

Your Answer


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.