[vlc-devel] [PATCH] xkb: fix capitalization

Victorien Le Couviour--Tuffet victorien.lecouviour.tuffet at gmail.com
Tue Nov 27 13:26:36 CET 2018


The core expects keycodes to be all lowercase. If the shift key is
pressed, then the keycode will contain the SHIFT modifier.
xkb_state_key_get_one_sym performs capitalization, because of this all
actions having SHIFT in their mapped keycode were not triggered.
---
 modules/video_output/xcb/xkb.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/modules/video_output/xcb/xkb.c b/modules/video_output/xcb/xkb.c
index 35384ee4c7..1260ad294b 100644
--- a/modules/video_output/xcb/xkb.c
+++ b/modules/video_output/xcb/xkb.c
@@ -110,7 +110,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);
-    uint_fast32_t vk = vlc_xkb_convert_keysym(keysym);
+    uint_fast32_t vk = xkb_keysym_to_lower(vlc_xkb_convert_keysym(keysym));
 
     if (vk != KEY_UNSET)
         for (size_t i = 0; i < ARRAY_SIZE(modifiers); i++)
-- 
2.19.1



More information about the vlc-devel mailing list