[vlc-devel] [PATCH] xkb: fix capitalization
Rémi Denis-Courmont
remi at remlab.net
Thu Nov 29 14:54:29 CET 2018
Hi,
That looks correct on simple Latin-only keyboard layouts, but does that assumption on shift and case apply to all layouts?
Le 28 novembre 2018 16:12:23 GMT+02:00, Victorien Le Couviour--Tuffet <victorien.lecouviour.tuffet at gmail.com> a écrit :
>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 | 8 ++++----
> 1 file changed, 4 insertions(+), 4 deletions(-)
>
>diff --git a/modules/video_output/xcb/xkb.c
>b/modules/video_output/xcb/xkb.c
>index 35384ee4c7..813ee8e79e 100644
>--- a/modules/video_output/xcb/xkb.c
>+++ b/modules/video_output/xcb/xkb.c
>@@ -32,6 +32,9 @@
> #include <vlc_actions.h>
> #include "video_output/xcb/vlc_xkb.h"
>
>+#ifdef HAVE_XKBCOMMON
>+# include <xkbcommon/xkbcommon.h>
>+
> static int keysymcmp (const void *pa, const void *pb)
> {
> int a = *(const uint32_t *)pa;
>@@ -54,7 +57,7 @@ static uint_fast32_t
>vlc_xkb_convert_keysym(uint_fast32_t sym)
>
> /* X11 Latin-1 range */
> if (sym <= 0xff)
>- return sym;
>+ return xkb_keysym_to_lower(sym);
> /* X11 Unicode range */
> if (sym >= 0x1000100 && sym <= 0x110ffff)
> return sym - 0x1000000;
>@@ -90,9 +93,6 @@ static uint_fast32_t
>vlc_xkb_convert_keysym(uint_fast32_t sym)
> return KEY_UNSET;
> }
>
>-#ifdef HAVE_XKBCOMMON
>-# include <xkbcommon/xkbcommon.h>
>-
> struct modifiers
> {
> char name[8];
>--
>2.19.1
>
>_______________________________________________
>vlc-devel mailing list
>To unsubscribe or modify your subscription options:
>https://mailman.videolan.org/listinfo/vlc-devel
--
Envoyé de mon appareil Android avec Courriel K-9 Mail. Veuillez excuser ma brièveté.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.videolan.org/pipermail/vlc-devel/attachments/20181129/28061d75/attachment.html>
More information about the vlc-devel
mailing list