On Fri, Jul 24, 2015 at 12:30:24PM +0200, Mats Blakstad wrote: > Hi > > I've just started to learn about XKB. Sorry I post my question here if it > is the wrong place, I couldn't find any forum! > > I work on a project for local languages in Togo, we're working on 25 > languages there (en.globalbility.org). We want to make a new keyboard that > are based on the French one that include symbols for local languages. I've > tested with the XKB system inside Ubuntu and made a first test keybord > (really not final version, just to test it). > > I have problem as there are several of the languages use tones on their > symbols like acute accent ( ´ ), grave accent ( *`* ), circumflex ( *ˆ *) > tilde ( *~ *) and macron ( ¯ ) on top of them. > > Here are the extra symbols I've added to the keyboard: > ʒ ɛ ǝ ƴ ʋ ɩ ɔ ʊ ɗ ɖ ƒ ɣ ɦ ɲ ɓ ŋ > > It should be possible to write them like this (examples from texts we have > produced): > ί ɔ́ ɛ́ > ɛ̀ ɔ̀ > ɔ̃ ɛ̃ ɔ̃ ĩ > ɛ̄ > î > > How can I modify these kinds of combination symbols? > > I try to click AltGr+` and after AltGr+ɛ to get ɛ̀, but then noting > happens, and after I only get ɛ (without grave accent). Why? Is it because > the keyboard missunderstand when I click AltGr two times? How can I solve > this? > > Here is the small file I made to test it: > > default partial alphanumeric_keys > xkb_symbols "basic" { > > // First we include the whole French keyboard > include "fr" > > // We give our new keyboard a name > name[Group1]="French (Togo)"; > > // Then we start to change the keys on the French keyboard. > // Each key have a unique number. > // Each key have 4 values: default, shift, altgr, shift+altgr (altgr > is the right side 'alt' key) > > // First row > > > // Second row > key <AD02> { [ z, Z, U0292, U01B7 ] }; // U0292 = ʒ > (small), U01B7 = Ʒ (capital) > key <AD03> { [ e, E, U025B, U0190 ] }; // U025B = > ɛ (small), U0190 = Ɛ (capital) > key <AD04> { [ r, R, U01DD, U018E ] }; // U01DD = ǝ > (small), U018E = Ǝ (capital) > key <AD06> { [ y, Y, U01B4, U01B3 ] }; // U01B4 = ƴ > (small), U01B3 = Ƴ (capital) > key <AD07> { [ u, U, U028B, U01B2 ] }; // U028B = ʋ > (small), U01B2 = Ʋ (capital) > key <AD08> { [ i, I, U0269, U0196 ] }; // U0269 = ɩ > (small), U0196 = Ɩ (capital) > key <AD09> { [ o, O, U0254, U0186 ] }; // U0254 = ɔ > (small), U0186 = Ɔ (capital) > > // Third row > key <AC01> { [ q, Q, U028A, U01B1 ] }; // U028A = ʊ > (small), U01B1 = Ʊ (capital) > key <AC02> { [ s, S, U0257, U018A ] }; // U0257 = ɗ > (small), U0189 = Ɗ (capital) > key <AC03> { [ d, D, U0256, U0189 ] }; // U0256 = ɖ > (small), U0189 = Ɖ (capital) > key <AC04> { [ f, F, U0192, U0191 ] }; // U0192 = ƒ > (small), U0191 = Ƒ (capital) > key <AC05> { [ g, G, U0263, U0194 ] }; // U0263 = ɣ > (small), U0194 = Ɣ (capital) > key <AC06> { [ h, H, U0266, U0124 ] }; // U0266 = ɦ > (small), U0124 = Ĥ (capital) > key <AC10> { [ m, M, U0272, U019D ] }; // U0272 = ɲ > (small), U019D = Ɲ (capital) > > > // Fourth row > key <AB05> { [ b, B, U0253, U0181 ] }; // U0253 = ɓ > (small), U0181 = Ɓ (capital) > key <AB06> { [ n, N, U014B, U014A ] }; // U014B = ŋ > (small), U014A = Ŋ (capital) > > > };
I may well be wrong, but I think you need to add new "combinations" to XCompose - not just the "weird" things where the Compose key (Multi_key) is used for a new combination of letters in the same way that I can compose o e to œ, but also adding existing dead key accents to letters. My experience is that any UTF-8 locale which does not have its own entry in /usr/share/X11/locale will use the en_US.UTF-8/Compose definitions. I have my own keyboard maps ("just because I can"), here is a short extract to show what I mean. Unfortunately the lines are long. # First pull in the standard en_US.UTF-8 sequences include "%L" # descender on cedilla (right hook like ogonek supposedly preferred, but all fonts are left hook! <dead_cedilla> <Cyrillic_ZHE> : "Җ" U496 # ZHE with descender <dead_cedilla> <Cyrillic_zhe> : "җ" U497 # zhe with descender <dead_cedilla> <Cyrillic_ZE> : "Ҙ" U498 # ZE with descender <dead_cedilla> <Cyrillic_ze> : "ҙ" U499 # ze with descender <dead_greek> <dead_acute> <A> : "Ά" U0386 # ALPHA with tonos <dead_greek> <dead_acute> <a> : "ά" U03AC # alpha with tonos No, you won't have a dead_greek key in your map, it's just an example. I use urxvt, so it is easy for me to type the numbers to get the representations in the strings such as Җ and Ά. However, there are some limitations to this - 1. If the accented letter is not available as a pre-composed letter, you need to use a combining accent. I'm not sure if XCompose can translate dead_accent some_letter to combining_accent some_letter, but if not you could generate combining accents in the keymap, and then compose combining_acute <A> to pre-composed A with acute. 2. For gtk apps, the Compose tables were set into stone years ago and they will not recognise recent changes, let alone local additions. In my .xinitrc or .xsession I use export GTK_IM_MODULE="xim" 3. I have not recently examined how well, or badly, this works in kde (I don't have _much_ use for my additions). I recommend that you begin by looking at the en_US Compose file to get a feeling for how things are done. Don't be fooled if you can't see anything at first, there are a lot of blank lines at the start of that file. Good luck! ĸen -- This one goes up to eleven! _______________________________________________ xorg@lists.x.org: X.Org support Archives: http://lists.freedesktop.org/archives/xorg Info: http://lists.x.org/mailman/listinfo/xorg Your subscription address: %(user_address)s