In previous versions of OSX, I could use Ctrl Shift Power on my built in keyboard, or Ctrl Shift Eject on my (old) Apple bluetooth keyboard to lock the screen.
After upgrading to Sierra, that shortcut stopped working. Using Karabiner-EventViewer I discovered that pressing the built in power button triggers SysKey 0x6
, and the Bluetooth keyboard Eject triggers no events.
Whats going on, and how can re-enable that shortcut?
Best Answer
There are different ways to lock your screen.
Note: These shortcut tips are for Sierra and below. In High Sierra, there is a new entry under the Apple Menu (with shortcut) to lock the screen.
1. Use keychain
Open keychain -> Settings. Choose from there Show keychain status in menu bar.
You can now choose from the menu bar to lock your screen.
With this option, you need your password to log in next time.
2. Use Hot Corners to lock your screen
First, go to your System Settings -> Desktop & Screen Saver and choose Hot Corners on the bottom right.
Next, choose one of the corners the option Put Display to Sleep. I prefer bottom right, but this is by each user different.
That's all. One note: You can configure in the Privacy Settings when the display will be locked. For example, if you have it set to five minutes, you need to enter your password after the time in your setting is gone. You can change this to immediately, for example.
3. Lock Screen (with Shortcut)
Because @Flimm asked for a shortcut to lock the screen, here is a solution below High Sierra.
Usually, there are two solutions. You can use CTRL+Shift+Power Button or
CTRL+Shift+Eject-Key to lock the screen.
Both solutions are not my favourites, and for that reason, I've created a Shell Script with Automator. Thanks to Taylor who gave me this hint.
/System/Library/CoreServices/Menu\ Extras/User.menu/Contents/Resources/CGSession -suspend
Make sure that on the top right of the Automator-Window, both pull down-menus are set as no input in any application.
For better understanding, I have put the pictures below.
Apple Support Documents Mac Keyboard Shortcuts