Problem with mapping a key to multiple characters (Unicode + diacritic symbol)

Pierre-Luc Angles angles at stud.uni-heidelberg.de
Thu Mar 14 13:04:11 UTC 2019


Dear Ilya, dear all,

thanks again for your answers.

Without knowing if this is the good direction, I have tested to change 
~/.XCompose by typing first the diacritic and then the "diacriticised" 
letter, but it does not make differences in LibreOffice and in Firefox. 
Note that when I type AltGr+& in Firefox, it remains an ampersand 
whereas in LibreOffice it appears as nothing and does not react.


With <i_breve_below> : "i̯", in ~/.XCompose, xev:

KeyPress event, serial 37, synthetic NO, window 0x4000001,
     root 0x168, subw 0x0, time 43917, (-441,-13), root:(110,255),
     state 0x4080, keycode 10 (keysym 0x100050f5, i_breve_below), 
same_screen YES,
     XLookupString gives 0 bytes:
     XmbLookupString gives 0 bytes:
     XFilterEvent returns: True

KeyPress event, serial 37, synthetic NO, window 0x4000001,
     root 0x168, subw 0x0, time 43917, (-441,-13), root:(110,255),
     state 0x4080, keycode 0 (keysym 0x0, NoSymbol), same_screen YES,
     XLookupString gives 0 bytes:
     XmbLookupString gives 3 bytes: (69 cc af) "i̯"
     XFilterEvent returns: False

KeyRelease event, serial 37, synthetic NO, window 0x4000001,
     root 0x168, subw 0x0, time 44049, (-441,-13), root:(110,255),
     state 0x4080, keycode 10 (keysym 0x100050f5, i_breve_below), 
same_screen YES,
     XLookupString gives 0 bytes:
     XFilterEvent returns: False



With <i_breve_below> : "̯i" in ~/.XCompose, xev:

KeyPress event, serial 37, synthetic NO, window 0x4000001,
     root 0x168, subw 0x0, time 1688270, (728,366), root:(1279,634),
     state 0x4080, keycode 10 (keysym 0x100050f5, i_breve_below), 
same_screen YES,
     XLookupString gives 0 bytes:
     XmbLookupString gives 0 bytes:
     XFilterEvent returns: True

KeyPress event, serial 37, synthetic NO, window 0x4000001,
     root 0x168, subw 0x0, time 1688270, (728,366), root:(1279,634),
     state 0x4080, keycode 0 (keysym 0x0, NoSymbol), same_screen YES,
     XLookupString gives 0 bytes:
     XmbLookupString gives 3 bytes: (cc af 69) "̯i"
     XFilterEvent returns: False

KeyRelease event, serial 37, synthetic NO, window 0x4000001,
     root 0x168, subw 0x0, time 1688400, (728,366), root:(1279,634),
     state 0x4080, keycode 10 (keysym 0x100050f5, i_breve_below), 
same_screen YES,
     XLookupString gives 0 bytes:
     XFilterEvent returns: False


The big difference in xev seems to be these lines:

XmbLookupString gives 3 bytes: (69 cc af) "i̯"
XmbLookupString gives 3 bytes: (cc af 69) "̯i"

Thanks again and sorry for all these messages.

Best,

Pierre-Luc

Le 13/03/2019 à 19:32, Ilya Anfimov a écrit :
> On Wed, Mar 13, 2019 at 03:20:00PM +0100, Pierre-Luc Angles wrote:

>>
>> now I have tried once again in my keyboard layout
>>
>> key <AE01>    { [        ampersand,                1,
>>   i_breve_below,                   U032F ] };
>>
>> Typing it in a LibreOffice document with the right font results in no
>> reaction (whereas before it reacts like NoSymbol by putting the default
>> onesuperior).
>   Did  you  restarted  libreoffice completely? I mean, closing any
> window and checking that no "quickstart" is hanging in memory?
>   XKeysymDB and *Compose are read only once at startup.

Yes, I have rebooted my computer several times and it does not react 
when I type AltGr+& in LibreOffice.

> 
>> Running xev I can see now:
>>
>> KeyPress event, serial 37, synthetic NO, window 0x4c00001,
>>      root 0x168, subw 0x0, time 2807193, (-519,30), root:(568,309),
>>      state 0x4090, keycode 0 (keysym 0x0, NoSymbol), same_screen YES,
>>      XLookupString gives 0 bytes:
>>      XmbLookupString gives 3 bytes: (69 cc af) "i??"
>>      XFilterEvent returns: False
>   It's probably the second event after that keypress.
>   And  this  is  the usual xlib compose path: real keypresses that
> are part of composing sequences (or can be such a part)  reported
> as  usual,  except  that XFilterEvent returns True, after receiv-
> ing a complete sequence (or getting something that is  definitely
> not a beginning of a sequence) an event  with the keycode 0 simu-
> lated that returns final string via  XmbLookupString.
> 
>> KeyRelease event, serial 37, synthetic NO, window 0x4c00001,
>>      root 0x168, subw 0x0, time 2807315, (-519,30), root:(568,309),
>>      state 0x4090, keycode 10 (keysym 0x100050f5, i_breve_below), same_screen
>> YES,
>>      XLookupString gives 0 bytes:
>>      XFilterEvent returns: False
>>
>> KeyRelease event, serial 37, synthetic NO, window 0x4c00001,
>>      root 0x168, subw 0x0, time 2810008, (-519,30), root:(568,309),
>>      state 0x4090, keycode 108 (keysym 0xfe03, ISO_Level3_Shift), same_screen
>> YES,
>>      XKeysymToKeycode returns keycode: 92
>>      XLookupString gives 0 bytes:
>>      XFilterEvent returns: False
>>
>> Note that a working key typed with the ALtGr modifier on the same keyboard
>> layout has just two paragraphs in xev, for example:
>   This  doesn't seems to use Compose. Just a usual unicode symbol,
> directly translated (0x0101  in   Unicode   is   0xc4   0x81   in
> utf8).

Yes, indeed it is a working key that was not using XCompose but refers 
to a Unicode symbol number.

> 
>> KeyPress event, serial 37, synthetic NO, window 0x4c00001,
>>      root 0x168, subw 0x0, time 2802465, (-519,30), root:(568,309),
>>      state 0x4090, keycode 24 (keysym 0x1000101, U0101), same_screen YES,
>>      XLookupString gives 2 bytes: (c4 81) "??"
>>      XmbLookupString gives 2 bytes: (c4 81) "??"
>>      XFilterEvent returns: False
>>
>> KeyRelease event, serial 37, synthetic NO, window 0x4c00001,
>>      root 0x168, subw 0x0, time 2802581, (-519,30), root:(568,309),
>>      state 0x4090, keycode 24 (keysym 0x1000101, U0101), same_screen YES,
>>      XLookupString gives 2 bytes: (c4 81) "??"
>>      XFilterEvent returns: False
>>
>>
>> It seems then to be the good direction, so thank you but I do not see what I
>> could do now.
>>
>> Thanks again!
>>
>> Best,
>>
>> Pierre-Luc
>>
>> Le 13/03/2019 ?? 15:04, Pierre-Luc Angles a ??crit :
>>> Dear Ilya, dear all,
>>>
>>> Thanks again for this important remark.
>>>
>>> My ~/.XCompose file is then the following:
>>>
>>> <i_breve_below> : "i??"
>>> <u_breve_below> : "u??"
>>> <i_wtdot_ring_above> : "????"
>>> <I_ring_above> : "I??"
>>> <c_caron_dot_below> : "????"
>>> <C_caron_dot_below> : "????"
>>> <s_macron_below> : "s??"
>>> <S_macron_below> : "S??"
>>> <H_macron_below> : "H??"
>>> <h_circumf_below> : "h??"
>>> <H_circumf_below> : "H??"
>>>
>>> My /usr/share/X11/XKeysymDB is the following:
>>>
>>> i_breve_below        :100050F5
>>> u_breve_below        :100050F6
>>> i_wtdot_ring_above    :100050F7
>>> I_ring_above        :100050F8
>>> c_caron_dot_below    :100050F9
>>> C_caron_dot_below    :100050FA
>>> s_macron_below        :100050FB
>>> S_macron_below        :100050FC
>>> H_macron_below        :100050FD
>>> h_circumf_below        :100050FE
>>> H_circumf_below        :100050FF
>>>
>>> and in my keyboard layout I have tried in a first time with:
>>>
>>>
>>> key <AE01>    { [        ampersand,                1,
>>> i_breve_below,                   U032F ] };
>>>
>>> and afterwards i a second time with
>>>
>>> key <AE01>    { [        ampersand,                1,
>>> U100050F5,                   U032F ] };
>>>
>>> The keyboard is working but the i_breve_below or U100050F5 is not
>>> working (I still have this xev when I type on the ampersand key + the
>>> AltGr modifier:
>>>
>>> KeyRelease event, serial 37, synthetic NO, window 0x4e00001,
>>>       root 0x168, subw 0x0, time 2120434, (-409,14), root:(142,282),
>>>       state 0x4090, keycode 10 (keysym 0xb9, onesuperior), same_screen YES,
>>>       XKeysymToKeycode returns keycode: 49
>>>       XLookupString gives 2 bytes: (c2 b9) "??"
>>>       XFilterEvent returns: False
>>>
>>> I do not see where the problem is now...
>>>
>>> It could be helpful if some one has a key.
>>>
>>> Thanks again and sorry for bothering you with that.
>>>
>>> Best,
>>>
>>> Pierre-Luc
>> _______________________________________________
>> xorg at lists.x.org: X.Org support
>> Archives:http://lists.freedesktop.org/archives/xorg
>> Info:https://lists.x.org/mailman/listinfo/xorg
>> Your subscription address: %(user_address)s


More information about the xorg mailing list