Equivalent of Win-L on Mac

17

6

Possible Duplicate:
Is there a keystroke that can lock the Mac OS X screensaver?

What is the equivalent of the shortcut Win + L on a Mac? Eg. the shortcut to lock the computer when you go away from it.

Espen Herseth Halvorsen

Posted 2009-08-08T14:37:01.677

Reputation: 793

Question was closed 2010-05-14T22:11:32.627

@Psy While we appreciate your efforts, please hold off the kbd markup bulk editing. We have a community decision not to encourage these kinds of edits unless they also drastically improve the quality of the post. Feel free however to discuss this on [meta] with us!

– slhck – 2011-09-17T11:09:41.393

@Psy No worries — no damage done! Just make sure to really improve the post, then it should be fine. Sorry if the whole process is a bit unclear – there's a little history of bulk edits on Super User (which could be long to explain). – slhck – 2011-09-17T11:13:29.813

Answers

9

A solution using Quicksilver (or any utility that can bind a keyboard shortcut to an AppleScript):

  • Create an AppleScript (using /Application/Apple Script/Script Editor.app), containing..

    do shell script "/System/Library/CoreServices/Menu\\ Extras/User.menu/Contents/Resources/CGSession -suspend"
    
  • Save it somewhere (~/Library/Scripts/ maybe)

  • Open the Quicksilver preferences (open quicksilver and press Cmd+,)

  • Go to Triggers, click Add Hotkey (from the + button)

  • Find the script, make sure the action is "Run" and click save:

    enter image description here

  • Click the Trigger next to the new entry, and press the desired lock keyboard shortcut

dbr

Posted 2009-08-08T14:37:01.677

Reputation: 4 987

1With the latest quicksilver, works in snow leopard, too! – adurity – 2009-09-04T15:48:31.537

The latest version of Quicksilver is available at http://code.google.com/p/blacktree-alchemy/downloads/list - not from Blacktree's site

– dbr – 2009-10-10T19:10:48.427

14

I was in the same position as yourself when moving from Windows to OS X. I originally posted this on my blog, but I'm re-posting here. It's not a key binding, but a case of moving your mouse to a corner of the screen which activates the screen saver and so locks your machine.

Fire up System Preferences and select Expose & Spaces.

System Preferences / Expose & Spaces

In there change one of the Active Screen Corners to Start Screen Saver. I've selected Bottom Left.

Active Screen Corners

Next go back to System Preferences and select Security.

System Preferences / Security

In Security, make sure the General tab is selected and then tick the top option of Require password to wake this computer from sleep or screen saver.

Security / Require password

That's it!

Pauk

Posted 2009-08-08T14:37:01.677

Reputation: 924

6Note that holding down a modifier key in the Exposé preferences, allows one to set an active screen corner to work only in combination with that key. Like Cmd-Bottom Left rather than just Bottom Left in the image above. – Arjan – 2009-08-08T17:29:23.330

Interesting point, I was happy for it to work just by moving the mouse cursor into one of the corners as a really quick method of "locking". – Pauk – 2009-08-08T17:45:04.963

6

For 10.6 Snow Leopard, one can easily add a Service using Automator, and then assign any keyboard shortcut using System Preferences. See Fast User Switching/Apple Menu? for details.

Fast User Switching in Automator

/System/Library/CoreServices/Menu\ Extras/User.menu/Contents/Resources/CGSession -suspend

Arjan

Posted 2009-08-08T14:37:01.677

Reputation: 29 084

I forgot about the shiney new services system. This is far nicer than my Quicksilver solution, +1 – dbr – 2009-10-10T19:11:58.347

3

Go to Applications \ Utilities and launch 'KeyChain Access'.

In the Preferences, select 'show status in menu bar'.

You'll now have a little padlock item in the menu bar area.

Click this and the first option will be 'lock screen'. This will lock the screen (causing screensaver to kick in).

Now in the System Preference, in the Security item, on the General tab, pick 'Require Password to wake this computer from sleep or screen saver'.

Bingo. Now when you select 'lock' from the menu, your computer will be locked and require your password to access again. It's not quite Windows-L, but it's not too bad.

If you find a neat way to bind a keyboard shortcut to this, let us know! :-)

robsoft

Posted 2009-08-08T14:37:01.677

Reputation: 646

1

A rather awkward keyboard binding is described in the link posted by Wil, http://www.macworld.com/article/49080/2006/01/lockscreen.html

– Arjan – 2009-08-08T15:40:01.607

That's quite an interesting article Arjan, thanks! – robsoft – 2009-08-08T16:53:30.360

@robsoft, No such option in keychain access preferences.. – Pacerier – 2019-07-21T07:13:11.640

1

I have found this article for you - http://www.macworld.com/article/49080/2006/01/lockscreen.html

It discusses setting up a screensaver shortcut that will lock your screen.

By default, it looks like there is just a logout shortcut which obviously means you lose your stuff.

William Hilsum

Posted 2009-08-08T14:37:01.677

Reputation: 111 572

1

You can install SizzlingKeys and get keyboard control for iTunes plus features like "Put computer to sleep" or "Lock computer" in the extras preference pane. This works in the free version.

Grzegorz Adam Hankiewicz

Posted 2009-08-08T14:37:01.677

Reputation: 1 029

0

I just found that Google Quick Search Box (which I use instead of Quicksilver) has a command "Lock Screen" that invokes the Login Window like with Quick User Switching enabled. It also shows Command-Alt-L as a keyboard command, but it doesn't work for me.

hanleyp

Posted 2009-08-08T14:37:01.677

Reputation: 6 519