KeyCharacterMap problem and Bluetooth Headset

57 views
Skip to first unread message

Ajith Kamath

unread,
Oct 11, 2010, 11:34:50 PM10/11/10
to android-porting, android-d...@googlegroups.com, Erin Yueh, 0xlab...@googlegroups.com, Pavan Savoy
Hi

I am facing a problem with Bluetooth Headset and KeyCharacter Mapping
When I press play/pause button from Samsung sbh-170 , its not getting reflected in Phone.
I traced and  came to know that , normally scan code of 164, keycode of 85 is formed when i press Headset play/pause. And PhoneWindow manager will intercept this and send ACTION_MEDIA_BUTTON if keycode =85 (KeyEvent.KEYCODE_MEDIA_PLAY_PAUSE).

But keycode that I'm getting is 0 even when i press headset play/pause in PhoneWindow Manager. Even in KeyInputQueue, the keycode that is obtained is 0
Does anybody when keycode gets generated??

Also I got following error in log :

 AVRCP: Send key 164 (1) fd=23
WARN/KeyCharacterMap(2550): Can't open keycharmap file
WARN/KeyCharacterMap(2550): Error loading keycharmap file '/system/usr/keychars/AVRCP.kcm.bin'. hw.keyboards.131077.devname='AVRCP'
WARN/KeyCharacterMap(2550): Using default keymap: /system/usr/keychars/qwerty.kcm.bin

Can this be a problem ? If so , how??
Please suggest.

Regards,
Ajith

Dianne Hackborn

unread,
Oct 11, 2010, 11:43:30 PM10/11/10
to android-d...@googlegroups.com, android-porting, Erin Yueh, 0xlab...@googlegroups.com, Pavan Savoy
This is unrelated to keycharmap files, which are used for converting key events to printable characters.  Generally the Linux driver for the device should be reporting the key as the standard Linux key code, and there is a generic scan code -> key code mapping the platform has for turning those to Android key code.s

--
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-d...@googlegroups.com
To unsubscribe from this group, send email to
android-develop...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en



--
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, and so won't reply to such e-mails.  All such questions should be posted on public forums, where I and others can see and answer them.

Ajith Kamath

unread,
Oct 12, 2010, 9:01:02 AM10/12/10
to hac...@android.com, android-d...@googlegroups.com, android-porting, Erin Yueh, 0xlab...@googlegroups.com, Pavan Savoy
Hi Dianne

Thanks for info..

I found out the problem was in Avrcp.kl , Its file my system is using for scancode -keycode generation.
I added following in avrcp.kl after i found that 164,128 and 159  has no entry at all:

key 164   MEDIA_PLAY_PAUSE    WAKE
key 128   MEDIA_STOP          WAKE
key 159   MEDIA_FAST_FORWARD  WAKE

Anyways, Its working now.

Thanks ,
Ajith



Reply all
Reply to author
Forward
0 new messages