[vlc-commits] xkb: move keycode offsetting

Rémi Denis-Courmont git at videolan.org
Tue May 29 21:00:46 CEST 2018


vlc | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Tue May 29 21:56:37 2018 +0300| [9216a4f086397bdd7aa63f1dbb2a478d46b98340] | committer: Rémi Denis-Courmont

xkb: move keycode offsetting

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=9216a4f086397bdd7aa63f1dbb2a478d46b98340
---

 modules/video_output/wayland/input.c | 2 +-
 modules/video_output/xcb/xkb.c       | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/modules/video_output/wayland/input.c b/modules/video_output/wayland/input.c
index 8147df1d2f..7627e48789 100644
--- a/modules/video_output/wayland/input.c
+++ b/modules/video_output/wayland/input.c
@@ -298,7 +298,7 @@ static void keyboard_key_cb(void *data, struct wl_keyboard *keyboard,
     if (unlikely(sd->keystate == NULL))
         return;
 
-    vk = vlc_xkb_get_one(sd->keystate, keycode);
+    vk = vlc_xkb_get_one(sd->keystate, keycode + 8);
     if (vk)
     {
         msg_Dbg(wnd, "key: 0x%08"PRIxFAST32" (XKB: 0x%04"PRIx32")",
diff --git a/modules/video_output/xcb/xkb.c b/modules/video_output/xcb/xkb.c
index 0e4f5021cc..7eb667e385 100644
--- a/modules/video_output/xcb/xkb.c
+++ b/modules/video_output/xcb/xkb.c
@@ -109,7 +109,7 @@ static const struct modifiers modifiers[] =
 
 uint_fast32_t vlc_xkb_get_one(struct xkb_state *state, uint_fast32_t keycode)
 {
-    xkb_keysym_t keysym = xkb_state_key_get_one_sym(state, keycode + 8);
+    xkb_keysym_t keysym = xkb_state_key_get_one_sym(state, keycode);
     uint_fast32_t vk = vlc_xkb_convert_keysym(keysym);
 
     if (vk != KEY_UNSET)



More information about the vlc-commits mailing list