The Best Computer Tips and Tricks

How to Lock Mac Screen with Keyboard Shortcut

May 26, 2013 By: Jono Category: Macintosh

how to lock mac screen with keyboard shortcut

If you need to temporarily leave your Mac unattended, you need to lock your Mac screen before leaving it. In a less secure environment, lock Mac screen will help you to protect the data that you have. Because it’s better for you to prevent other people trying to do bad things to your data.

There are many ways to lock your Mac screen; the best way is to press the keyboard shortcut. With it, you can do it quickly and instantly displays the login screen without having to close one of the things that you do. So, how to lock Mac screen with a keyboard shortcut?

Create Lock Screen Service

  1. Open Automator from your Applications folder.
  2. Then Select Service as the document type to create a new service.
  3. Under the header Service Receives: select no input in any application.
    automator create a new service
  4. In the left pane select Utilities, then double-click the Run Shell Script is in the right panel.
    utilities run shell script
  5. Type the following script into the command box that appears.
    /System/Library/CoreServices/”Menu Extras”/ –suspend
    lock mac screen command
  6. Save/ ⌘S and name your service as Lock Screen. Once saved, you can close the Automator.

Assign a Keyboard Shortcut

  1. Open up System Preferences and Keyboard, select the Keyboard Shortcuts tab.
  2. Next, of the left pane select Application Shortcuts. Click on the plus (+) to add a new shortcut.
  3. In the dialog window set like this.
    • Application: select All Applications, because we want to leave all applications when the shortcut is executed.
    • Menu Title: Enter Lock Screen as the Menu Title. Please note, you must enter the same name when saving the name service in Automator.
    • Keyboard Shortcut: please fill it with ^⌘LCtrl+Cmd+L (I use it). Please note, that you enter is the shortcut key to press when you want to lock your Mac screen.
      lock mac screen keyboard shortcut
  4. Click Add to apply these settings on your Mac computer.

To lock your Mac screen, now you just need to press Ctrl+Cmd+L, then Mac login screen will be displayed. You do not need to worry when leaving your Mac unattended. No one can access your account until you enter the login password.