(xkb) how to map a key to multiple characters?

Dominique Pelle dominique.pelle at gmail.com
Sat Jan 10 14:00:07 PST 2009


Hi

I'm trying to create a new keyboard layout with xbd for X11 on
Linux for the C'HWERTY Breton keyboard.

This keyboard is a bit unusual because it has a C'H key and
pressing this key should result in 3 characters being emitted: C,
apostrophe and H.  It also has a CH key which should result
in 2 characters being emitted: C and H.

You can see a photo of this keyboard with the "C'H" and "CH" there:

  http://upload.wikimedia.org/wikipedia/commons/9/9e/Bretona-klavaro.jpg

Notice the C'H key for example near the top left, below the 1 and 2 keys.

C'H and CH are considered as single letters in Breton but Unicode has
no such code for the C'H trigraph or CH digraph (unlike IJ in Dutch
for example which is a single character in Unicode).

I'm new to creating keyboard layout with X.  I'm mostly done.
I have created a file in /usr/share/X11/xkb/symbols/  (Ubuntu-8.10)
and associated associate keys to characters with a bunch of
lines like these....

    ...snip...
    key <AD07> { [               u,              U
            ] };
    key <AD08> { [               i,              I
            ] };
    key <AD09> { [               o,              O,             oe,
         OE ] };
    key <AD10> { [               p,              P
            ] };
    ...snip...

It mostly works. However, there is one problem which I have not been
able to solve yet:

--> How to associate multiple characters to a key? (for the C'H and CH keys)

Hopefully that's possible.  The keyboard works well on Windows, but
I'd like to add support and use it with Linux.

Thanks

-- 
Dominique
http://dominiko.livejournal.com



More information about the xorg mailing list