I modified AT_Translated_Set_2_keyboard.kl, for example, set MENU for scancode 60, then when I send a keycode in Qemu (by kbd_put_keycode(60 & 0x7f) and kbd_put_keycode(60 | 0x80) ), Android could get a menu event. Seems the layout file is used to identify a raw code with a keycode.
Now I realize what the problem I have is, it is that not all scan code could be got by Android Runtime, for example, scan code 127 could not be identified. I say so, because EventHub::getEvent() could not catch the event. On Jun 1, 3:25 pm, Alex <alex....@gmail.com> wrote: > In Android emulator (ARM), logcat will report: > EventHub: New keyboard: devname="qwerty2", propName="hw.keyboards. > 65536.devname", keylayout="/system/usr/keylayout/qwerty.kl" > ... > KeyCharacterMap: Using default keymap: /system/usr/keychars/ > qwerty.kcm.bin. > > But in Android on x86 (eee_701), logcat will report: > EventHub: New keyboard: devname="AT Translated Set 2 Keyboard" > propName="hw.keyboards.0.devname", keylayout="/system/usr/keylayout/ > AT_Translated_Set_2_keyboard.kl" > ... > KeyCharacterMap: Using default keymap: /system/usr/keychars/ > AT_Translated_Set_2_keyboard.kcm.bin. > > So, without using goldfish device( there is a configuration option in > Android default ARM kernel: CONFIG_KEYBOARD_GOLDFISH_EVENTS=y), is it > possible to use qwerty keyboard like default Android emulator? > > The reason I hope to do this is , I want to modify the original qemu > (say, 0.10.xx) to add the phonemenu/home/goback menus. > I tried send the same keycode of phonemenu as in Android emulator > (ARM), seems it fails to recognize anything at all. But I could send > the keycode of letter 'a', and the letter could be identified. > So I guess, maybe the driver I use on x86 discards the keycode of > phonemenu. > > And, I want something to be confirmed here, if anyone know about that. > EventHub.cpp is the lowest layer in Android to receive key event? > And it use KeyCharacterMap.cpp to convert the key event to a mapped > code? > At last, WindowManagerServer.java will dispatch this key event? > > Is there anyone who knows something about that? --~--~---------~--~----~------------~-------~--~----~ unsubscribe: android-porting+unsubscr...@googlegroups.com website: http://groups.google.com/group/android-porting -~----------~----~----~----~------~----~------~--~---