11

Somewhat imperfect comparison: in Windows, you can simply press Win+L to lock Windows.

Is there a similar keyboard shortcut in Android?

7
  • 3
    No, there is no shortcut, the only way to lock Android, is by pressing the hardware power button which is programmed into the core of Android to do just that, i.e. perform a screen lock. Am sure there's a tasker profile somewhere that would just trigger a screen lock at the tap of the icon :)
    – t0mm13b
    Sep 27, 2012 at 13:55
  • And I am sure @t0mm13b wanted to trigger me mentioning Tasker. Same as with Plug'n'play: Works only for 50% (plug works). In fact, there's an option Display -> System Lock to turn the display of and activate keylock. And yes, you can use an icon to trigger that. But there's no "key pressed" event for the keyboard, unfortunately.
    – Izzy
    Sep 27, 2012 at 14:52
  • @Izzy : do you by any chance know when have they added that Display -> System Lock option? My 2.3.4 doesn't seem to have it.
    – C.B.
    Nov 20, 2013 at 16:20
  • @C.B. You misinterpreted my comment. I was refering to a Tasker activity.
    – Izzy
    Nov 20, 2013 at 20:13
  • @Izzy : oh, sorry about that, i'm a "droid noob". However, now that i know more context, i think "you can use an icon to trigger that" qualifies as a good-enough answer, since a shortcut on the touchscreen would be equivalent to a keypress IMO. Thanks for the input (and the clarifying link).
    – C.B.
    Nov 20, 2013 at 21:47

7 Answers 7

4

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 on your machine.


A complete ADB installer in 15 seconds for Windows can be found here: [XDA Forums - [OFFICIAL]TOOL][WINDOWS] ADB, Fastboot and Drivers - 15 seconds ADB Installer v1.4.3.

And for Linux machines, there is a script which is written by Corbin Davenport. Just execute the following command without the quotes in any Linux terminal to install

bash <(curl https://raw.githubusercontent.com/corbindavenport/nexus-tools/master/install.sh)

Hope this helps you although this is not a shortcut key.

2

On my BT Logitech keyboard:

FN + Esc = lock phone

1

I have a logitech K380 bluetooth keyboard and a Motorola One Action. I can lock the phone by pressing FN + L. The phone has Android One which is near stock Android.

1

For the users of the Logitech K850 keyboard, FN + F11 locks the Android device.

2
  • Does it really depend on the type of the keyboard? For me, it looks like an ordinary bluetooth wireless keyboard.
    – peterh
    Jan 10, 2021 at 12:26
  • The other answers specified here didn't work for me. Just stating this, so that folks can try this one as well, incase.
    – ryuke
    Jan 11, 2021 at 15:36
1

There is no way to lock the device using the keyboard.

If you want the same effect that your computer has when it locks on your phone (i.e. needing a password next time you log in), then go to Settings, Lock screen, and set it to require a password (or whatever you use) whenever you wake your phone.

1

Certain external (Bluetooth) keyboards have a function button that does this, but if you haven't found it, it probably isn't there.

0

You can use "WIN + L" to lock your Android phone with any keyboard just like you log out on Windows.

2
  • 1
    Hello. Could you mention the keyboard model with which you tried this key combo?
    – Firelord
    May 29 at 8:05
  • 1
    Your answer could be improved with additional supporting information. Please edit to add further details, such as citations or documentation, so that others can confirm that your answer is correct. You can find more information on how to write good answers in the help center.
    – Community Bot
    May 29 at 9:25

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .