[MPlayer-dev-eng] XF86 forward/rewind

Nicolas George nicolas.george at normalesup.org
Mon Apr 23 12:34:00 CEST 2012


Le decadi 30 germinal, an CCXX, Rafi Rubin a écrit :
> Hi, here's a little patch to add support for xf86 forward and rewind keys.
> These are sent by my remote when I hold down the next/prev buttons for
> continuous skip/seek.

Thanks for the patch.

> 
> Rafi

> diff --git a/input/input.c b/input/input.c
> index d8f094e..9c2eb61 100644
> --- a/input/input.c
> +++ b/input/input.c
> @@ -367,6 +367,8 @@ static const mp_key_name_t key_names[] = {
>    { KEY_STOP, "XF86_STOP" },
>    { KEY_PREV, "XF86_PREV" },
>    { KEY_NEXT, "XF86_NEXT" },
> +  { KEY_PREV, "XF86_REWIND" },
> +  { KEY_NEXT, "XF86_FORWARD" },

Two different names for the same key symbol do not seem like a good idea: if
someone actually has both XF86XK_AudioPrev and XF86XK_AudioRewind, they can
not map them both. I believe it would be a better idea to define new symbols
KEY_REWIND and KEY_FORWARD in osdep/keycodes.h.

>  
>    { KEY_CLOSE_WIN, "CLOSE_WIN" },
>  
> diff --git a/libvo/x11_common.c b/libvo/x11_common.c
> index 51c3669..318ef0e 100644
> --- a/libvo/x11_common.c
> +++ b/libvo/x11_common.c
> @@ -560,6 +560,8 @@ static const struct mp_keymap keysym_map[] = {
>      {XF86XK_AudioPlay, KEY_PLAY}, {XF86XK_AudioPause, KEY_PAUSE}, {XF86XK_AudioStop, KEY_STOP},
>      {XF86XK_AudioPrev, KEY_PREV}, {XF86XK_AudioNext, KEY_NEXT},
>      {XF86XK_AudioMute, KEY_MUTE}, {XF86XK_AudioLowerVolume, KEY_VOLUME_DOWN}, {XF86XK_AudioRaiseVolume, KEY_VOLUME_UP},
> +    {XF86XK_AudioRewind, KEY_REWIND}, {XF86XK_AudioForward, KEY_FORWARD},
> +    {XF86XK_AudioMute, KEY_MUTE}, {XF86XK_AudioLowerVolume, KEY_VOLUME_DOWN}, {XF86XK_AudioRaiseVolume, KEY_VOLUME_UP},

It looks like you made some kind of copy-paste mistake there.

>  #endif
>      {0, 0}
>  };

Regards,

-- 
  Nicolas George
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: Digital signature
URL: <http://lists.mplayerhq.hu/pipermail/mplayer-dev-eng/attachments/20120423/0a21a489/attachment.asc>


More information about the MPlayer-dev-eng mailing list