OS X: Lock the screen via a keyboard shortcut
Update: There’s actually a default shortcut: Ctrl+Shift+Eject.
What I did to undo what I did below:
- System Preferences: Keyboard » Keyboard Shortcuts » Uncheck “Start Screen Saver”
- Finder: Home » Library » Services » Delete “Start Screen Saver.workflow”
Applications » Automator
- Choose “Services”
- On top-right: Service receives [no input] in [any application]
- Search for “Start Screen Saver” on the left and drag it to the right
- File » Save and name it “Start Screen Saver”
System Preferences
Security » General
- Check “Require password” [immediately]
Keyboard » Keyboard Shortcuts
- On the left, select Services
- On the right, in General » Start Screen Saver
- Double click on the right of the name (in the “invisible shortcut column”)
- Assign the key combinaison (I use Ctrl+Alt+Cmd+L, Cmd+L doesn’t work)