mirror of https://github.com/mpv-player/mpv
input: add new keys: Back, Tools, ZoomIn, ZoomOut
These were the only keys missing to support mapping all keycodes on a [popular RF Remote][1] used with Linux HTPC apps. Note that X11/XWayland + xkbcomp still warns about keycodes > 255, due to the 8-bit limit in Xorg but `mpv` on Wayland is able to handle these. For X11 users, there are [a couple options][2]: - [Gianni Ceccarelli's patched `xf86-input-evdev`][3] - [Use udev hwdb to map scancodes to keycodes][4] [1]: https://www.mythtv.org/wiki/Air_mouse_rf_remote [2]: https://unix.stackexchange.com/a/436233/7688 [3]: https://www.thenautilus.net/SW/xf86-input-evdev/ [4]: https://wiki.archlinux.org/title/Map_scancodes_to_keycodes
This commit is contained in:
parent
af9b53f3a3
commit
fa378249dd
|
@ -62,7 +62,9 @@
|
|||
#Alt+up add video-pan-y 0.1 # move the video down
|
||||
#Alt+down add video-pan-y -0.1 # move the video up
|
||||
#Alt++ add video-zoom 0.1 # zoom in
|
||||
#ZOOMIN add video-zoom 0.1 # zoom in
|
||||
#Alt+- add video-zoom -0.1 # zoom out
|
||||
#ZOOMOUT add video-zoom -0.1 # zoom out
|
||||
#Alt+BS set video-zoom 0 ; set video-pan-x 0 ; set video-pan-y 0 # reset zoom and pan settings
|
||||
#PGUP add chapter 1 # seek to the next chapter
|
||||
#PGDWN add chapter -1 # seek to the previous chapter
|
||||
|
|
|
@ -165,6 +165,10 @@ static const struct key_name key_names[] = {
|
|||
{ MP_KEY_CHANNEL_DOWN,"CHANNEL_DOWN" },
|
||||
{ MP_KEY_PLAYONLY, "PLAYONLY" },
|
||||
{ MP_KEY_PAUSEONLY, "PAUSEONLY" },
|
||||
{ MP_KEY_BACK, "BACK" },
|
||||
{ MP_KEY_TOOLS, "TOOLS" },
|
||||
{ MP_KEY_ZOOMIN, "ZOOMIN" },
|
||||
{ MP_KEY_ZOOMOUT, "ZOOMOUT" },
|
||||
|
||||
// These are kept for backward compatibility
|
||||
{ MP_KEY_PAUSE, "XF86_PAUSE" },
|
||||
|
|
|
@ -82,6 +82,10 @@
|
|||
#define MP_KEY_CHANNEL_DOWN (MP_KEY_MM_BASE+22)
|
||||
#define MP_KEY_PLAYONLY (MP_KEY_MM_BASE+23)
|
||||
#define MP_KEY_PAUSEONLY (MP_KEY_MM_BASE+24)
|
||||
#define MP_KEY_BACK (MP_KEY_MM_BASE+25)
|
||||
#define MP_KEY_TOOLS (MP_KEY_MM_BASE+26)
|
||||
#define MP_KEY_ZOOMIN (MP_KEY_MM_BASE+27)
|
||||
#define MP_KEY_ZOOMOUT (MP_KEY_MM_BASE+28)
|
||||
|
||||
/* Function keys */
|
||||
#define MP_KEY_F (MP_KEY_BASE+0x40)
|
||||
|
|
|
@ -132,6 +132,8 @@ static const struct mp_keymap keymap[] = {
|
|||
{XKB_KEY_XF86HomePage, MP_KEY_HOMEPAGE}, {XKB_KEY_XF86WWW, MP_KEY_WWW},
|
||||
{XKB_KEY_XF86Mail, MP_KEY_MAIL}, {XKB_KEY_XF86Favorites, MP_KEY_FAVORITES},
|
||||
{XKB_KEY_XF86Search, MP_KEY_SEARCH}, {XKB_KEY_XF86Sleep, MP_KEY_SLEEP},
|
||||
{XKB_KEY_XF86Back, MP_KEY_BACK}, {XKB_KEY_XF86Tools, MP_KEY_TOOLS},
|
||||
{XKB_KEY_XF86ZoomIn, MP_KEY_ZOOMIN}, {XKB_KEY_XF86ZoomOut, MP_KEY_ZOOMOUT},
|
||||
|
||||
{0, 0}
|
||||
};
|
||||
|
|
|
@ -753,6 +753,8 @@ static const struct mp_keymap keymap[] = {
|
|||
{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},
|
||||
{XF86XK_Back, MP_KEY_BACK}, {XF86XK_Tools, MP_KEY_TOOLS},
|
||||
{XF86XK_ZoomIn, MP_KEY_ZOOMIN}, {XF86XK_ZoomOut, MP_KEY_ZOOMOUT},
|
||||
|
||||
{0, 0}
|
||||
};
|
||||
|
|
Loading…
Reference in New Issue