Is there a shortcut which invokes the "Login Window..." fast user switching command?

Solution 1:

The short answer is no. OS X Lion doesn't have a way to assign a keyboard shortcut to Fast User Switching (which is going to the Login Window without logging off the current user).

There are, however, various alternatives to achieve that. You've pointed to different workarounds (I haven't tested those), I'll name a few more:

  • What I use: Launchbar. Simply invoke it, type "log.." and you already have the option to press enter to go to the login window, can't get much faster than that (you could assign a shortcut to that if you wish).

  • Although I haven't used it in a while, the "competitor" Alfred + Powerpack had something similar, the command was "lock" as far as I can remember.

  • BetterTouchTool: recommended by other users (I've seen this app in friend's Macs but never used it myself). It will also do what you want (shortcut to go to the Login Screen). It's been also recommended in the answers you linked. I add it here for reference and because someone mentioned it in the comments by @Steven Fischer

  • Using pure Scripting like the one used here. Note however, that most of the scripts that you will find, will make you write and hardcode the account's password, which is not a good idea. But if you check there, there's an alternative that doesn't do that. I haven't tested that myself, but if that script works, assigning it to a keyboard shortcut via Automator/Service ought to be a simple task. This Super User answer better explains the process (thanks @andy)

In any case, there's no built in method by default, but as you can see, with some digging and/or third party, you can do it. Using something like Launchbar or Alfred is a good idea for other reasons anyway ;)

Solution 2:

Control+Shift+Eject

or

Control+Shift+power-button

The latter doesn't seem to work in Mac OS X 10.11(.6), but the former still works.

To guarantee that the login window is shown immediately after entering one of the above shortcuts, make sure to change the relevant security setting to require a password (i.e. require logging-in) immediately "after sleep or screen saver begins":

  1. Enter +space to open Spotlight search.
  2. Type "security" and hit Enter when "security & Privacy" is suggested; the "Security & Privacy" settings should be shown.
  3. Ensure you're on the "General" page.
  4. Change the "Require password ..." setting to "immediately".

Source for info about the password security setting:

  • How to lock your Mac like you did on your PC - fixedByVonnie