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

Ken Moffat zarniwhoop at
Mon Mar 11 20:29:21 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.
> and
> that is why I have created a file ~/.XCompose, with contents

Things have changed a lot in the last 10 years, nowadays UTF-8 is
the predominant.

> <i_breve_below> : "i̯"
> <u_breve_below> : "u̯"

I'm assuming that you want to produce a combined letter with the
breve underneath it.  But that link was for a Breton mapping with
multiple glyphs on a single key.  If you really want something like
that, then I suppose that the easiest way is to map the breve_below
to one sequence, and follow it with the letter, so a compose
sequence followed by the regular letter (i, u, etc).

> 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.

I don't think I have a mapping for i with breve below, and I haven't
looked at my own XCompose and keymaps for a long time, but I see two
differences between what I think you are trying to do, and what works
(for some other glyphs) for me :

1.  My XCompose is in a very different format to yours : On the left
side, the keys you want to use (typically starting with Multi_key,
i.e. the Compose key).  Then, after the ':' I put the desired glyph
itself in the double quotes and follow it with the unicode value in
UNNN+ format.

For the glyph I can either paste from e.g. gucharmap or, when I know
the unicode value, input the hex digits in icewm (possibly called
iso-14755, or something like that - hold Ctrl+Shift, key the digits.

So for your i with breve below, on the right side I would put
 : "ḭ" U1E2D

I'm sure the hex digits do not need to be in capitals, but the U
probably does.

To get the Compose key <Multi_key> I have to specify it in my
keyboard conf file in xorg.conf.d/ :

Option "XkbOptions"

(Should all be one line - that gives me two groups, for latin
alphabet and cyrillic alphabet - you only need the compose part).

Also, my methods probably do not work in gnome, and maybe not in

2. For the keyboard definition itself: except for known key values,
I use the unicode value for additions.

My own maps are to provide accents and similar on dead keys (the
standard British map includes e.g Dead Acute on AltGr + ';' so á,
(as well as things like ß on AltGr + 's', þ on AltGr + 'p' etc) and
I've added a few more for dealing with European languages.  In
particular, I map AltGr + 'g' to dead_greek (I'm only looking to be
able to key monotonic greek).

And then, since I wanted to be able to key cyrillic letters (or most
of them), I created a cyrillic map based on phonetic russian but
adapted towards the gb keyboard.  Again, compose sequences get used.

A few excerpts, to help illustrate:

key maps

 my latin map

    // key AE02 '2' add low double-quotes
    key <AE02>  { [         2,   quotedbl,      twosuperior,             U201e ] };

    // <AC05> : replace eng, ENG with dead_greek, use Compose ng for eng
    key <AC05>  { [         g,          G,       dead_greek,        dead_greek ] };

 my cyrillic map

    // add 'a ie ligature' to 'A'
    key <AC01> { [        Cyrillic_a,        Cyrillic_A,        U04D5,        U04D4  ] };

So, AE02 has ² and „ (low double-quotes) on AltGr + '2' and AltGr +
Shift + '2'.  AC05 replaces '<eng>' (ŋ) and '<ENG>' with dead_greek.

In my cyrillic map, AC01 gets the cyrillic equivalent of æ Æ on AltGr
(matches what my latin map has).

For Compose sequences, I offer the following as examples:

<Multi_key> <D> <Z>                                             : "DZ"   U1F1    # DZ ligature
<Multi_key> <D> <z>                                             : "Dz"   U1F2    # Dz ligature
<Multi_key> <d> <z>                                             : "dz"   U1F3    # dz ligature

<Multi_key> <s> <h>                                             : "ʃ"   U283    # small esh
<Multi_key> <Z> <H>                                             : "Ʒ"   U1B7    # EZH
<Multi_key> <z> <h>                                             : "ʒ"   U292    # ezh

> For information, I am using Linux Manjaro 4.19 XFCE and scim is not enabled
> and not downloaded on my laptop.

XFCE without scim should be fine.  The machine where I'm typing this
is using xfce, and I've typed the following:

 on the 2 key with AltGr :  ²„

 cyrillic map, additions after the space : асд ӕӔ
 latin map : asdæÆ DZDzdz ʃ Ʒʒ

> 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

Thanks for asking, you reminded my that I never copied over my
~/.XCompose to my newest machines :)  From that, you can tell that I
currently don't have much need to type some of the more exotic
combinations I've created.

Hope this helped.  But if I've totally misunderstood and you really
do need a _single_ sequence similar to "^h" but the caron replaced
by a low breve, then sorry for wasting your time.

  It is said that there are two great unsolved problems in computer
  science: naming, cache invalidation, and off-by-one errors.
                         -- Ben Bullock

More information about the xorg mailing list