Look at AVRCP.kl in development/emulator/keymap:
key 164   MEDIA_PLAY_PAUSE    WAKE
key 128   MEDIA_STOP          WAKE
key 163   MEDIA_NEXT          WAKE
key 165   MEDIA_PREVIOUS      WAKE
key 168   MEDIA_REWIND        WAKE
key 159   MEDIA_FAST_FORWARD  WAKE


On Fri, Feb 19, 2010 at 11:07 AM, Chris Stratton <cs07...@gmail.com> wrote:

> On Feb 18, 2:39 pm, Porting beginner <porting.begin...@gmail.com>
> wrote:
> > Hi,
> >
> > I am trying from few days but don't get any information related to issue
> as
> > below.
> >
> > Which  KEYCODE to send to input dev ( /dev/input/event2 here ) on headset
> > button press event from my
> > headset driver so can answer / hang-up call ?
>
> Please see arch/arm/mach-msm/htc_headset.c which says in part:
>
>    Button presses are interpreted as input event (KEY_MEDIA). Button
> presses
>    are ignored if the headset is plugged in, so the buttons on 11 pin
> -> 3.5mm
>    jack adapters do not work until a headset is plugged into the
> adapter. This
>    is to avoid serial RX traffic causing spurious button press
> events.
>
> Also I don't think you want to inject  it into the event file
> yourself:
>
> static void button_pressed(void)
> {
>        printk(KERN_INFO "[H2W] button_pressed\n");
>        atomic_set(&hi->btn_state, 1);
>        input_report_key(hi->input, KEY_MEDIA, 1);
>        input_sync(hi->input);
> }
>
> You will also want to read Documentation/input/input-programming.txt
>
> Finally you might want to learn about the -R flag to grep ;-)
>
> --
> unsubscribe: 
> android-kernel+unsubscr...@googlegroups.com<android-kernel%2bunsubscr...@googlegroups.com>
> website: http://groups.google.com/group/android-kernel

-- 
unsubscribe: android-kernel+unsubscr...@googlegroups.com
website: http://groups.google.com/group/android-kernel

Reply via email to