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

Ken Moffat zarniwhoop at ntlworld.com
Mon Mar 11 23:38:19 UTC 2019


On Mon, Mar 11, 2019 at 11:23:28PM +0100, Pierre-Luc Angles wrote:
> Dear ĸen, dear all,
> 
> Thanks a lot for your nice and long answer.
> 
> In the meantime, I have also found another thread in the archives of this
> list that could be also relevant for my problem:
> 
> https://lists.freedesktop.org/archives/xorg/2013-February/055490.html
> 
> and
> 
> https://lists.freedesktop.org/archives/xorg/2013-February/055491.html
> 
> but since I have no idea how IBUS is working and that it seems to be quite
> complicated, I would like maybe to try something with XCompose, unless it
> does not work in a long term vision or in a stable way for a combination of
> a letter and a diacritic sign...
> 
> As a temporary solution, I have indeed mapped the dead keys like
> dead_belowmacron and dead_belowcircumflex, but I would prefer to have these
> keys mapped with a modifier, i.e. in a third keysym (i.e. with AltGr) for
> this keycode with a modifier like the example that I already gave:
> 
> key <AE01>    { [        ampersand,                1, i_breve_below,
> U032F ] };
> 
> It means that I would like to type i with an inverted breve below in the
> AE01 key by pressing the AltGr modifier before that.
> 
> 
> > 
> > So for your i with breve below, on the right side I would put
> >   : "ḭ" U1E2D
> 
> Please note that all the compositions that I have created in XCompose
> correspond to characters that have currently no Unicode number assigned to.
> So U1E2D is for i with a tilde below and not for i with inverted breve
> below. All the other examples that you kindly gave me are also already
> numbered Unicode characters, which is here not the case.
> 
> Thanks again!
> 
> Best,
> 
> Pierre-Luc

Ah, sorry, I was looking at the h in front of the i and missed that
you wanted 'inverted'.  And xfce was displaying gucharmap in faint
(less-than-black) text when I switched to a term.

Characters without predefined unicode are hard.

With a spare dead_key key, in XCompose perhaps something like

<multi_key> <dead_something> <ampersand> : "your string here"
using a combining key for inverted breve below.

My own compose mappings with dead keys seem a bit problematic, but
my notes suggest that the dead key might need to be pressed before
the Compose key.

On the other hand, mapping the appropriate composing key to the dead
key might be easier.  So map the "spare" keyboard location to U032F
for combining inverted breve below, and key that, followed by the
regular 'h' or 'i' ?  Or perhaps key the letter followed by the
combining character if that doesn't work.

For quick testing (playing with XCompose, changing it, dropping out
of X and going back in seems easier than rebuilding the keymap -
assuming you use startx) maybe just add in XCompose
<Multi_key> <asciicircum> <asciicircum> : "̯" U032F

That untested example assumes you have ^ available as a standard key.

ĸen
-- 
  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