Somewhat imperfect comparison: in Windows, you can simply press Win+L to lock Windows.
Is there a similar keyboard shortcut in Android?
Android Enthusiasts Stack Exchange is a question and answer site for enthusiasts and power users of the Android operating system. It only takes a minute to sign up.Sign up to join this community
You could type in "adb shell input keyevent 26" which in turn will lock your screen
For this you need the usb debugging enabled on your phone and adb should be installed in your machine
A complete adb installer in 15 seconds for windows can be found here
And for Linux Machine there is a script which is written by Corbin Davenport. just execute below given line without the quotes in any Linux terminal to install
Hope this helps you although this is not a shortcut key