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

Ilya Anfimov ilan at tzirechnoy.com
Tue Mar 12 14:16:43 UTC 2019


On Mon, Mar 11, 2019 at 07:11:33PM +0100, Pierre-Luc Angles wrote:
> Dear list-members,
> 
> I allow me to write to you because I am now creating / mapping two different
> keyboard layouts, one for the transliteration of Ancient Egyptian and the
> other for a special Greek polytonic keyboard used by people reading ancient
> Greek documents. I have problems with these two new keyboards.
> 
> First, I would like to solve my problem with the transliteration of Ancient
> Egyptian.
> 
> I read in the archive of this list this thread (cf.
> https://lists.freedesktop.org/archives/xorg/2009-January/042282.html) and
> that is why I have created a file ~/.XCompose, with contents
> 
> <i_breve_below> : "i??"
> <u_breve_below> : "u??"
> <??_ring_above> : "????"
> <I_ring_above> : "I??"
> <??_dot_below> : "????"
> <??_dot_below> : "????"
> <s_macron_below> : "s??"
> <S_macron_below> : "S??"
> <H_macron_below> : "H??"
> <h_circumflex_below> : "h??"
> <H_circumflex_below> : "H??"
> 
> When I modify for example my keyboard layout like this
> :
> 
> key <AE01>	{ [        ampersand,                1,        i_breve_below, 			
> U032F ] };
> 
> the i_breve_below does not work and function, I think, as if it would be
> ???NoSymbol??? instead of this.

 You are probably right. Keysyms does not get added automatically
by naming it, and I don't see any mention of i_breve_below and so
on  in  standard keysymdef.h , which is the source of the default
set of keysyms.

 You can always check it by running xev and pressing that key  in
it's window. It should display NoSymbol, AFAIK.

 If you really want your keysym -- you can probably add one.  You
need to define a value for that keysym, probably in  the  vendor-
specific  range #x10000000..#x1FFFFFFF  (29th bit set). Also note
already used ones, you can get it from the  last  used  XKeysymDB
file:


https://gitlab.freedesktop.org/xorg/lib/libx11/blob/00175397480b76d32bf82b0c7c94c91a2a95954e/src/XKeysymDB

Also  note,  that  #x11000000 to #x1100FFFF are reserved for key-
pad, so don't use that either.


 Then you can write your new XKeysymDB in the same format as  ex-
ample  above  and put it the /usr/share/X11 on every machine that
needs to work with your keys.
 Well, the /usr/share/X11/XKeysymDB is the place that my  current
devuan  expects  it to be, and other distributions can place this
file in other places, like /usr/X11R6/lib/ or so. You can quickly
find an exact place by running

  strace xkbcomp "$DISPLAY"  - 2>&1 >/dev/null  |grep XKeysym

  (if you have strace, of course).

 Then  reloading  your xkb should work, and .XCompose should work
also.

 Or you can type any keysym number in-place just by  typing  it's
code in hex with 0x prefix as in 0x10000501

 However,  it  can  be  simpler to borrow some unused or reserved
unicode position, as every unicode character in the  range  0x100
--  0x10FFFF have a default assigned keysym name "Uxxx", e.g. the
cyrillic capital letter A (0x410 unicode value) would  be  keysym
"U410"  and  first private use area symbol (0xE000 unicode value)
would be keysym "UE000".

> 
> For information, I am using Linux Manjaro 4.19 XFCE and scim is not enabled
> and not downloaded on my laptop.
> 
> I would be very nice if you could me help somehow to solve this problem.
> 
> I thank you in advance a lot.
> 
> Best regards,
> 
> 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