2015-06-12 Shortcut to lock OS X

There isn't any standard function to have a shortcut key to lock your screen in OS X. The best way to do this without involving the screensaver, is the second method that's mentioned in this link: How to Quickly Lock Your Screen in Mac OS X with Keyboard Shortcut

Do take special care: the command being called won't work if you just copy/paste it from that page. Use the following line instead:

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

Their CMS apparently replaces the standard minus-sign with a special en-dash. The above line is correct.