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

Rémi Denis-Courmont remi at remlab.net
Tue Nov 27 19:34:14 CET 2018


Le tiistaina 27. marraskuuta 2018, 14.26.36 EET Victorien Le Couviour--Tuffet 
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 | 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));

I cannot parse this. It does not seem to make sense, TBH.

> 
>      if (vk != KEY_UNSET)
>          for (size_t i = 0; i < ARRAY_SIZE(modifiers); i++)


-- 
雷米‧德尼-库尔蒙
http://www.remlab.net/





More information about the vlc-devel mailing list