how to unlock screen using keyboard

6,419 views
Skip to first unread message

李晖

unread,
Feb 8, 2012, 10:42:25 AM2/8/12
to android...@googlegroups.com
hi, all
    I succeed porting android to a device which don't has touch screen support, when the android system up, the screen is locked, so I want to unlock the screen by using the keyboard. I was informed remapping the keyboard can solve this problem, but I don't known the keycode of unlock screen.
    Currently, I can succeed implement the MENU, HOME, BACK, SEARCH keys by adding following code into the qwerty.kl file,
key 60 MENU #F2 succeed
key 61 EXPLORER #F3
key 62 HOME #F4 succeed
key 63 BACK #F5 succeed
key 64 SEARCH #F6 succeed
key 65 POWER #F7
as don't know the keycode of unlock screen, I can not unlock screen by using keyboard, can anyone tell me the keycode of unlock screen or method to unlock screen using keyboard? thanks in advance!

BTW, I also want to bring up the program manager view(all program can launched here) by using the keyboard, any suggestion?

andy


Best Regards
-------------------------------------------------------------------
-------------------------------------------------------------------
北京航空航天大学大学嵌入式系统实验室
新主楼G座1028室
李晖
MSN:lihui...@163.com

Alvin Wong

unread,
Feb 8, 2012, 9:43:06 PM2/8/12
to android-porting
Hi,

I recall I heard someone saying that double-click on the POWER key
will unlock the screen and I've seemed to tried this once in 2.2, but
I can't do this again in 2.3.7, strange... You can try this first. If
it failed, perhaps you should consider modifying the Android code
manually...

For any other operations, you can always do that with DPAD arrow keys
and center key, given that you've successfully unlocked the screen.

Good luck,
Alvin Wong
> MSN:lihui205...@163.com

Zoltan Kuscsik

unread,
Feb 9, 2012, 2:21:16 AM2/9/12
to alvin...@gmail.com, android-porting
try:

# adb shell input keyevent 82

2012/2/9 Alvin Wong <alvin...@gmail.com>

Goutam Kumar

unread,
Feb 9, 2012, 7:11:36 AM2/9/12
to alvin...@gmail.com, android-porting
Hi,

To unlock the screen using keyboard, you need #F1 button, generally it is mapped with Menu button.

Regards,
Goutam

2012/2/9 Alvin Wong <alvin...@gmail.com>

Alvin Wong

unread,
Feb 9, 2012, 7:22:01 AM2/9/12
to android-porting
Hi,

Oh well I just discovered that the key assigned as MENU can unlock the
screen. check your keyboard driver and .kl file for the exact key.

Regards,
Alvin Wong
> MSN:lihui205...@163.com

李晖

unread,
Feb 9, 2012, 10:46:17 AM2/9/12
to android-porting
thank you very much, I will try the POWER key, I tried double click
the MENU key today, but it don't work!

李晖

unread,
Feb 12, 2012, 9:39:33 AM2/12/12
to android-porting
yeah, this works, but what I purpose is unlock the screen by one key!
thank you anyway!

On 2月9日, 下午3时21分, Zoltan Kuscsik <kusc...@gmail.com> wrote:
> try:
>
> # adb shell input keyevent 82
>
> 2012/2/9 Alvin Wong <alvinhoc...@gmail.com>
Reply all
Reply to author
Forward
0 new messages