Enabling Qwerty keyboard with Android

265 views
Skip to first unread message

Shivdas Gujare

unread,
Nov 30, 2008, 9:36:12 AM11/30/08
to android...@googlegroups.com
Hi All,

I am porting android on omap3 platform. I can boot android on it,
and able to see GUI. I connected "Qwerty USB Keyboard(Dell Keyboard)"
to my board.

From kernel configuration, I selected "Event interface" under "Device
Drivers -> Input device support -> Generic input layer" and associated
USB support
and I can see events generated on /dev/input/event0.

I compared events generated by my Dell Keyboard on target and emulator
keyboard using "getevent". and looks like it all are similar.
I verified file "/system/usr/keylayout/qwerty.kl" for both emulator
and my target. and are both same.

Now my target detects only events from "ENTER", and android GUI works
properly. But not a single key other than "ENTER" gets detected
by Android.

Do I am missing any further verification/modification?
Do I needs to do anything else setup to make keyboard working?
How can I correlate scan keycodes genetared by my Dell keyboard and
expected by android.

Thanks for any help.

Thanks and Regards,
Shivdas Gujare

R K

unread,
Dec 1, 2008, 7:16:21 AM12/1/08
to android...@googlegroups.com
Hi Shivdas,
 
http://beagleboard.googlecode.com/files/evtest.c run following test case, will help you to see the keyboard events.
 
Regards,
Ravi


Shivdas Gujare

unread,
Dec 2, 2008, 9:14:48 PM12/2/08
to android...@googlegroups.com
Hi Ravi,
Thanks for your help.

After changing permissions of system/usr/keychars/qwerty.kcm.bin
Every thing worked fine and now I can map any keyboard key.

Also after changing permissions of /dev/input/event1, I can use USB
optical mouse also.

Regards,
Shivdas Gujare

Maxime Petazzoni

unread,
Dec 3, 2008, 12:20:22 PM12/3/08
to android-porting
Hi,

On Dec 2, 6:14 pm, "Shivdas Gujare" <shivdas.t...@gmail.com> wrote:
> Hi Ravi,
> Thanks for your help.
>
> After changing permissions of system/usr/keychars/qwerty.kcm.bin
> Every thing worked fine and now I can map any keyboard key.
>
> Also after changing permissions of /dev/input/event1, I can use USB
> optical mouse also.

Just out of curiosity, how do you get a pointer?

>
> Regards,
> Shivdas Gujare
>
> On Mon, Dec 1, 2008 at 5:46 PM, R K <ravi.andr...@gmail.com> wrote:
> > Hi Shivdas,
>
> >http://beagleboard.googlecode.com/files/evtest.crun following test case,
> > will help you to see the keyboard events.
>
> > Regards,
> > Ravi
>
> > On Sun, Nov 30, 2008 at 8:06 PM, Shivdas Gujare <shivdas.t...@gmail.com>

Dianne Hackborn

unread,
Dec 3, 2008, 12:50:19 PM12/3/08
to android...@googlegroups.com
On Wed, Dec 3, 2008 at 9:20 AM, Maxime Petazzoni <maxime.p...@gmail.com> wrote:
Just out of curiosity, how do you get a pointer?

We don't currently support a mouse pointer.

--
Dianne Hackborn
Android framework engineer
hac...@android.com

Note: please don't send private questions to me, as I don't have time to provide private support.  All such questions should be posted on public forums, where I and others can see and answer them.

Maxime Petazzoni

unread,
Dec 3, 2008, 1:51:48 PM12/3/08
to android-porting


On Dec 3, 9:50 am, "Dianne Hackborn" <hack...@android.com> wrote:
> On Wed, Dec 3, 2008 at 9:20 AM, Maxime Petazzoni <maxime.petazz...@gmail.com
>
> > wrote:
> > Just out of curiosity, how do you get a pointer?
>
> We don't currently support a mouse pointer.

I know. I was just wondering how Shivdas made any use of a USB mouse
in this situation :)

>
> --
> Dianne Hackborn
> Android framework engineer
> hack...@android.com

Rupesh Gujare

unread,
Dec 4, 2008, 5:49:15 AM12/4/08
to android...@googlegroups.com
Hi,
 
   Mouse is identified as a trackball. It doesn't show pointer but you can navigate using it.

Regards,
-- 
Rupesh Gujare
http://embinux.com

Jinjun

unread,
Dec 9, 2008, 2:44:51 AM12/9/08
to android-porting
Hi Shivdas,

I am using PXA270 as my development board. The touch screen is not
working therefore I have to use keyboard and mouse. I have some
problem to use keyboard and mouse to select the icons. I try to used
arrow keys or mouse to highlight the icon or menu but it is very
difficult. For example, when I use down arrow key, the icon that is
two spot below the currently highlighted icon will get selected. It is
almost impossible to use mouse to get where I want to be. Sometime
when I finally select the icon or menu, when enter key is hitted or
clicking the mouse, the icon that is next to the selected is
activated. Any idea?
Thanks,

Jinjun

On Dec 2, 6:14 pm, "Shivdas Gujare" <shivdas.t...@gmail.com> wrote:
> Hi Ravi,
> Thanks for your help.
>
> After changing permissions of system/usr/keychars/qwerty.kcm.bin
> Every thing worked fine and now I can map any keyboard key.
>
> Also after changing permissions of /dev/input/event1, I can use USB
> optical mouse also.
>
> Regards,
> Shivdas Gujare
>
>
>
> On Mon, Dec 1, 2008 at 5:46 PM, R K <ravi.andr...@gmail.com> wrote:
> > Hi Shivdas,
>
> >http://beagleboard.googlecode.com/files/evtest.crun following test case,
> > will help you to see the keyboard events.
>
> > Regards,
> > Ravi
>
> > On Sun, Nov 30, 2008 at 8:06 PM, Shivdas Gujare <shivdas.t...@gmail.com>
> > wrote:
>
> >> Hi All,
>
> >> I am porting android on omap3 platform. I can boot android on it,
> >> and able to see GUI. I connected "Qwerty USB Keyboard(Dell Keyboard)"
> >> to my board.
>
> >> From kernel configuration, I selected "Event interface" under "Device
> >> Drivers -> Input device support -> Generic input layer" and associated
> >> USB support
> >> and I can see events generated on /dev/input/event0.
>
> >> I compared events generated by my Dell Keyboard on target and emulator
> >> keyboard using "getevent". and looks like it all are similar.
> >> I verified file "/system/usr/keylayout/qwerty.kl" for both emulator
> >> and my target. and are both same.
>
> >> Now my target detects only events from "ENTER", and android GUI works
> >> properly. But not a single key other than "ENTER" gets detected
> >> by Android.
>
> >> Do I am missing any further verification/modification?
> >> Do I needs to do anything else setup to make keyboard working?
> >> How can I correlate scan keycodes genetared by my Dell keyboard and
> >> expected by android.
>
> >> Thanks for any help.
>
> >> Thanks and Regards,
> >> Shivdas Gujare- Hide quoted text -
>
> - Show quoted text -

Shivdas Gujare

unread,
Dec 10, 2008, 12:03:44 AM12/10/08
to android...@googlegroups.com
Hi Jinjun,
Don't have Idea about your problem.

But you should verify Events generated by your keyboard and
corresponding values in qwerty.kl
You can do this like,
1) Run getevent command on android, Press Key on keyboard, It will
show scancode in hex.
2) for ex. ENTER will generate scan code of "1C". convert this in to decimal.
3) and see if this is the same value in system/usr/keylayout/qwerty.kl
(i.e. "key 28 ENTER")
4) If not, modify file according to your keyboard.

Hope this will help.
Regards,
Shivdas

gougou

unread,
Dec 15, 2008, 10:19:51 PM12/15/08
to android-porting
Hi guys

I'm using a track ball and in drver , when press send a key event ,
when move send REL_X and REL_Y event.

I can get event using event test code.

But when in andriod the press key event works fine, and if I move the
trackball the andriod UI will crash can restart. log as below:

W/KeyCharacterMap( 692): No keyboard for id 0
W/KeyCharacterMap( 692): Can't open keycharmap file
E/KeyCharacterMap( 692): Can't find any keycharmaps (also tried /
system/usr/keychars/qwerty.kcm.bin)
I/DEBUG ( 633): *** *** *** *** *** *** *** *** *** *** *** *** ***
*** *** ***
I/DEBUG ( 633): Build fingerprint: 'generic/generic/generic/:1.0/
TC3/eng.zqy.20081216.183450:eng/test-keys'
I/DEBUG ( 633): pid: 692, tid: 692 >>> android.process.acore <<<
I/DEBUG ( 633): signal 11 (SIGSEGV), fault addr 00000000
I/DEBUG ( 633): r0 0000a878 r1 4001c450 r2 00000000 r3 4104ac14
I/DEBUG ( 633): r4 be99d628 r5 00000004 r6 ad32c555 r7 4104abf0
I/DEBUG ( 633): r8 be99d608 r9 4104abe8 10 4104abd8 fp 00000000
I/DEBUG ( 633): ip ad32c555 sp be99d608 lr ad00d9f8 pc
ad32c554 cpsr a0000030
I/DEBUG ( 633): #00 pc ad32c554 /system/lib/
libandroid_runtime.so
I/DEBUG ( 633): #01 lr ad00d9f8 /system/lib/libdvm.so
I/DEBUG ( 633): stack:
I/DEBUG ( 633): be99d5c8 00000001
I/DEBUG ( 633): be99d5cc 434bdea0
I/DEBUG ( 633): be99d5d0 00000018
I/DEBUG ( 633): be99d5d4 ad048e9f /system/lib/libdvm.so
I/DEBUG ( 633): be99d5d8 00000320
I/DEBUG ( 633): be99d5dc 400092c0
I/DEBUG ( 633): be99d5e0 434bdea0
I/DEBUG ( 633): be99d5e4 41083a70
I/DEBUG ( 633): be99d5e8 be99d638 [stack]
I/DEBUG ( 633): be99d5ec 00000008
I/DEBUG ( 633): be99d5f0 0000000d
I/DEBUG ( 633): be99d5f4 ad057899 /system/lib/libdvm.so
I/DEBUG ( 633): be99d5f8 00000018
I/DEBUG ( 633): be99d5fc 41083a70
I/DEBUG ( 633): be99d600 df002777
I/DEBUG ( 633): be99d604 e3a070ad
I/DEBUG ( 633): #00 be99d608 41083a70
I/DEBUG ( 633): be99d60c 0000bb00 [heap]
I/DEBUG ( 633): be99d610 ad32c555 /system/lib/
libandroid_runtime.so
I/DEBUG ( 633): be99d614 4001c450
I/DEBUG ( 633): be99d618 00001071
I/DEBUG ( 633): be99d61c 0000bb00 [heap]
I/DEBUG ( 633): be99d620 be99d628 [stack]
I/DEBUG ( 633): be99d624 ad041241 /system/lib/libdvm.so
I/DEBUG ( 633): be99d628 4104abe8
I/DEBUG ( 633): be99d62c 41fb5c63
I/DEBUG ( 633): be99d630 ad32c555 /system/lib/
libandroid_runtime.so
I/DEBUG ( 633): be99d634 be99d6a0 [stack]
I/DEBUG ( 633): be99d638 be99d6a0 [stack]
I/DEBUG ( 633): be99d63c 00000001
I/DEBUG ( 633): be99d640 ad00db80 /system/lib/libdvm.so
I/DEBUG ( 633): be99d644 41e5f158
I/DEBUG ( 633): be99d648 4104abfc
I/DEBUG ( 633): be99d64c be99d698 [stack]
> >> forums, where I and others can see and answer them.- 隐藏被引用文字 -
>
> - 显示引用的文字 -

Wang Xiaoguang

unread,
Dec 15, 2008, 10:24:33 PM12/15/08
to android...@googlegroups.com
That's a bug in android's building system, which may make the keylayout and keychar files unreadable.

use 'chmod 0644 /system/usr/[keylayout / keychar files]' to fix 

Shivdas Gujare

unread,
Dec 15, 2008, 11:55:58 PM12/15/08
to android...@googlegroups.com
Check permissions of keychars/qwerty.kcm.bin.
and also modify your qwerty.kcl as per your
requirement.

Regards,
Shivdas

Reply all
Reply to author
Forward
0 new messages