How to lock the screen in Mac OS X with an external keyboard
With the laptop keyboard, Cmd + Ctrl + Q
OS X Yosemite¶
With the laptop keyboard, Ctrl + Shift + Power is used to lock the screen on my 2015 MacBook Pro w/ OS X Yosemite. To lock the screen with an external PC keyboard, use Karabiner to map the Pause/Break key to Power.