Command + L to lock the computer on Mac

Many switchers (from Windows to Mac) are those who have asked me how they could get a quick keyboard shortcut to lock the computer as they used to do in Windows with the combination "Windows Key + L". The truth is that it was something comfortable that I also enjoyed on my debian linux and that we mackeros do not have but today, finally, I have achieved it.

I have found a resident application for the user called Keyboard Maestro and that executes a multitude of functions or function macros. Not only that but it is even capable of recording mouse and keyboard macros that can be launched with a combination of keys to taste.

Actually there is no internal command in the mac that removes the login window without going through the previous closing of the same but if we open System Preferences, Accounts and activate the fast user switch, we get a icon.

Now we can record the macro in Keyboard Maestro as follows:
First we press «Record»
Now we go to the icon (or user name) of the quick user change, we press the first letter of the option we want to execute, which in my case, as I have it in OS X in Spanish, would be V for «Start window of session…". We give enter to execute the selected action.
We return to the session and stop recording the macro and assign the keys "Command + L" or whatever you want.

When testing it we see that it does not work. The execution of the chain of saved commands is so fast that the interface does not have time to call its function in the menu with the V key, so the solution has been easy as well as "somewhat crappy". We give «New action» and at the bottom of «Pause», we set it to 1 second and we place the action between the first and third of the actions as indicated in this image.

capture-51.png

I know it is a lousy trick to have a quick change of user by keyboard so please, if anyone has a better one (other than activating password-protected screensavers) to comment.

You can also make calls to programs using key combinations. Very good.


Leave a Comment

Your email address will not be published. Required fields are marked with *

*

*

  1. Responsible for the data: Miguel Ángel Gatón
  2. Purpose of the data: Control SPAM, comment management.
  3. Legitimation: Your consent
  4. Communication of the data: The data will not be communicated to third parties except by legal obligation.
  5. Data storage: Database hosted by Occentus Networks (EU)
  6. Rights: At any time you can limit, recover and delete your information.