Title says it all: how do I lock the screen using a keyboard shortcut on OS X Mountain Lion with a Microsoft Natural Ergonomic Keyboard 4000?
|
|
You do not need to use Third Party Apps to set a global short cut. You can use Automator Services,System Preferences keyboard Shortcuts and the CGSession -suspend command that switches to a login screen. Use the Applescript :
in a Automator 'Service' like this with the set up as no input and all applications.
Save it and then go to the Keyboard System Preferences. -> Keyboard Shortcuts tab. Select Services on the right. And scroll down to the bottom on the left to 'General'. There you will see your service. Click the addShortCut. And give the service a shortcut. Clost system prefs.
You may need to quit some apps and re open them first for them to pick up the short cut for the first time. You can see the ones that have already picked it up..
Now try the shortcut from the keyboard. |
|||
|
|
|
Assuming your keyboard has an eject button, you need to go to System Preferences, and click on "Security & Privacy", then click on the "General" tab, then select the checkbox that says "Require password immediately after sleep or screensaver begins". Now you can lock your computer by pressing Control-Shift-Eject. This puts the computer to sleep, but because we've told it to lock on sleep, it also locks it. If your computer doesn't have an eject button, you will need to create your own custom shortcut. Unfortunately, you can only create shortcuts for menu items and services. Fortunately you can create a service to put the display to sleep (and thus lock the screen), and you can assign a shortcut to the service. For instructions on how to do this, see this Macworld page. |
|||||||||
|
|
I used KeyRemap4Macbook to remap the pause/break key to eject. KeyRemap4Macbook is free, and it shows up in System Preferences after installing. shift+ctrl+pause/break does the trick now.
|
||||
|
|
|
You can also log out to the fast user switching screen, but it doesn't turn off displays. Just assign a shortcut to this shell command:
If you have the Alfred Powerpack, you can give the lock action a shortcut in the hotkeys tab:
|
|||
|
|
|
You can easily add the padlock icon to your menu bar:
You can also add it through Keychain Access prefs. ;) |
||||
|
|





