Win+L in windows, which can be difficult with an ergonomic keyboard with only a left Win key, because you have to use two hands (or be very lanky and limber).
My first thought would be to re-map Win+L with AutoHotKey or similar. Or, just press start, and arrow up and over to lock (lots more keypresses though).
I'm no good with macros, but the start+arrow idea is great. For me it's only one more keypress, but I can do it all with one hand. Funny thing is, I use that combo at home to put my home computer to sleep, because I don't leave that running in between sessions. Thanks for the tip that I should have known already!
Don't know if this is different in 10.10.1 (Just switched to OSX a month ago so I have no prior experience with OSX)but this key-combo doesn't lock the screen, it starts the screen-saver.
If you want it to lock the screen you need to change your preferences in security and change the screen lockout time to "immediately" for it to act as a lock.
I run Linux but use the iMac keyboard and have also mapped locking to shift-eject. I didn't know it was so close to the OSX bindings. Very easy to hit, yet hard to hit accidentally.
In my experience this is one of the things Apple still has yet to perfect. I frequently have a problem of my mid-2012 MBP not wanting to wake up when I open the lid no matter how many times I close/open it. Often I have to do a hard reboot.
To Apple's credit, this is also still a problem with PC laptops from what I hear.
Does anyone know of an easier way?