From fa378249dd79296d7b10542a7545d05d4b6d0844 Mon Sep 17 00:00:00 2001 From: James Cuzella Date: Tue, 15 Aug 2023 05:27:03 -0600 Subject: 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 --- video/out/wayland_common.c | 2 ++ video/out/x11_common.c | 2 ++ 2 files changed, 4 insertions(+) (limited to 'video') diff --git a/video/out/wayland_common.c b/video/out/wayland_common.c index 983609dd83..abd18fae28 100644 --- a/video/out/wayland_common.c +++ b/video/out/wayland_common.c @@ -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} }; diff --git a/video/out/x11_common.c b/video/out/x11_common.c index f63e1f02cd..3eaad12470 100644 --- a/video/out/x11_common.c +++ b/video/out/x11_common.c @@ -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} }; -- cgit v1.2.3