mirror of
https://github.com/mpv-player/mpv
synced 2025-02-01 12:42:04 +00:00
input: add some more X11 multimedia/internet keys
These keys can be found on various "multimedia" and "internet" keyboard. X defines many keycodes, so I'm not adding all, just what I found on my own keyboard. Other key codes can be added on request.
This commit is contained in:
parent
e366c1a9c6
commit
61ba810752
@ -451,6 +451,12 @@ static const struct key_name key_names[] = {
|
||||
{ MP_KEY_VOLUME_UP, "VOLUME_UP" },
|
||||
{ MP_KEY_VOLUME_DOWN, "VOLUME_DOWN" },
|
||||
{ MP_KEY_MUTE, "MUTE" },
|
||||
{ MP_KEY_HOMEPAGE, "HOMEPAGE" },
|
||||
{ MP_KEY_WWW, "WWW" },
|
||||
{ MP_KEY_MAIL, "MAIL" },
|
||||
{ MP_KEY_FAVORITES, "FAVORITES" },
|
||||
{ MP_KEY_SEARCH, "SEARCH" },
|
||||
{ MP_KEY_SLEEP, "SLEEP" },
|
||||
|
||||
// These are kept for backward compatibility
|
||||
{ MP_KEY_PAUSE, "XF86_PAUSE" },
|
||||
|
@ -52,7 +52,7 @@
|
||||
#define MP_KEY_DOWN (MP_KEY_CRSR+2)
|
||||
#define MP_KEY_UP (MP_KEY_CRSR+3)
|
||||
|
||||
/* Multimedia keyboard/remote keys */
|
||||
/* Multimedia/internet keyboard/remote keys */
|
||||
#define MP_KEY_MM_BASE (MP_KEY_BASE+0x20)
|
||||
#define MP_KEY_POWER (MP_KEY_MM_BASE+0)
|
||||
#define MP_KEY_MENU (MP_KEY_MM_BASE+1)
|
||||
@ -67,6 +67,12 @@
|
||||
#define MP_KEY_VOLUME_UP (MP_KEY_MM_BASE+10)
|
||||
#define MP_KEY_VOLUME_DOWN (MP_KEY_MM_BASE+11)
|
||||
#define MP_KEY_MUTE (MP_KEY_MM_BASE+12)
|
||||
#define MP_KEY_HOMEPAGE (MP_KEY_MM_BASE+13)
|
||||
#define MP_KEY_WWW (MP_KEY_MM_BASE+14)
|
||||
#define MP_KEY_MAIL (MP_KEY_MM_BASE+15)
|
||||
#define MP_KEY_FAVORITES (MP_KEY_MM_BASE+16)
|
||||
#define MP_KEY_SEARCH (MP_KEY_MM_BASE+17)
|
||||
#define MP_KEY_SLEEP (MP_KEY_MM_BASE+18)
|
||||
|
||||
/* Function keys */
|
||||
#define MP_KEY_F (MP_KEY_BASE+0x40)
|
||||
|
@ -552,6 +552,9 @@ static const struct mp_keymap keymap[] = {
|
||||
{XF86XK_AudioNext, MP_KEY_NEXT}, {XF86XK_AudioMute, MP_KEY_MUTE},
|
||||
{XF86XK_AudioLowerVolume, MP_KEY_VOLUME_DOWN},
|
||||
{XF86XK_AudioRaiseVolume, MP_KEY_VOLUME_UP},
|
||||
{XF86XK_HomePage, MP_KEY_HOMEPAGE}, {XF86XK_WWW, MP_KEY_WWW},
|
||||
{XF86XK_Mail, MP_KEY_MAIL}, {XF86XK_Favorites, MP_KEY_FAVORITES},
|
||||
{XF86XK_Search, MP_KEY_SEARCH}, {XF86XK_Sleep, MP_KEY_SLEEP},
|
||||
#endif
|
||||
|
||||
{0, 0}
|
||||
|
Loading…
Reference in New Issue
Block a user