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

Rémi Denis-Courmont remi at remlab.net
Tue Jun 18 13:47:26 CEST 2019


Hi,

Core uses shift+Unicode code point. Nothing says it has to be Latin 1 subset code point.

Le 18 juin 2019 12:26:40 GMT+03:00, Thomas Guillem <thomas at gllm.fr> a écrit :
>
>On Mon, Dec 3, 2018, at 12:00, Rémi Denis-Courmont wrote:
>> Your humble opinion is not the question here. I don't think the
>design of VLC core has any bearing on X11 keyboard maps.
>
>VLC shortcut with "Shift+key" don't work without this patch.
>
>> 
>> Le 3 décembre 2018 12:24:51 GMT+02:00, Victorien Le Couviour
><victorien.lecouviour.tuffet at gmail.com> a écrit :
>>> Hi,
>>> 
>>> Since the core expects it to be this way and is unaware of the
>layout, imho yes.
>>> 
>>> On Thu, Nov 29, 2018 at 2:54 PM Rémi Denis-Courmont
><remi at remlab.net> wrote:
>>>> Hi,
>>>> 
>>>> That looks correct on simple Latin-only keyboard layouts, but does
>that assumption on shift and case apply to all layouts?
>
>VLC shortcuts use latin key anyway ("Shift+k" for example), so I don't
>get how it affect non latin keyboards.
>
>>>> 
>>>> 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];
>>>> 
>>>> -- 
>>>> Envoyé de mon appareil Android avec Courriel K-9 Mail. Veuillez
>excuser ma brièveté.
>>>> _______________________________________________
>>>>  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é. 
>> _______________________________________________
>> 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/20190618/e1d3d8a0/attachment.html>


More information about the vlc-devel mailing list