The Flat Earth Society
Other Discussion Boards => Technology & Information => Topic started by: xasop on April 03, 2021, 12:53:52 AM
-
As a student of the Irish language, I wanted a way to enter a sineadh fada without using the XCompose method that has served me so well up to this point. The reasons are efficiency and accuracy: XCompose requires three keystrokes to input é, as opposed to two for a keyboard layout with AltGr+e; and this has the knock-on effect of making mistakes commonplace, such as pressing the keys in the wrong order and getting *iománáiocht instead of iománaíocht.
Unfortunately, the standard Irish keyboard layout is based on the terminally crippled UK layout, which means that it has (among other things) @, ", #, ~ and a few other symbols in the wrong places. Therefore, I took it upon myself to learn how to write my own xkb symbols file to create an ANSI-based Irish keyboard layout.
This turned out to be quite straightforward. The main annoyance is that if you make a mistake, X gives you no information whatsoever except that your symbols file has a mistake somewhere in it. But with a little trial and error, it's easy to get something that works well.
And so, behold! My new keyboard layout. I simply inherited the us(basic) layout I was already using (I don't want any of my existing usage to change), and added some new characters as combinations with AltGr. Each key has four symbols associated with it, corresponding to the key on its own, with Shift, with AltGr and with AltGr+Shift, respectively. NoSymbol means not to change the existing behaviour, which is why I used it everywhere that AltGr is not involved.
xkb_symbols "basic" {
include "us(basic)"
name[Group1]= "Irish (ANSI)";
// Euro on 5 key
key <AE05> { [ NoSymbol, NoSymbol, EuroSign, cent ] };
// Q row
key <AD03> { [ NoSymbol, NoSymbol, eacute, Eacute ] };
key <AD04> { [ NoSymbol, NoSymbol, 0x100027C, NoSymbol ] };
// long r
key <AD05> { [ NoSymbol, NoSymbol, tabovedot, Tabovedot ] };
key <AD07> { [ NoSymbol, NoSymbol, uacute, Uacute ] };
key <AD08> { [ NoSymbol, NoSymbol, iacute, Iacute ] };
key <AD09> { [ NoSymbol, NoSymbol, oacute, Oacute ] };
key <AD10> { [ NoSymbol, NoSymbol, pabovedot, Pabovedot ] };
// A row
key <AC01> { [ NoSymbol, NoSymbol, aacute, Aacute ] };
key <AC02> { [ NoSymbol, NoSymbol, sabovedot, Sabovedot ] };
key <AC03> { [ NoSymbol, NoSymbol, dabovedot, Dabovedot ] };
key <AC04> { [ NoSymbol, NoSymbol, fabovedot, Fabovedot ] };
key <AC05> { [ NoSymbol, NoSymbol, gabovedot, Gabovedot ] };
// Z row
key <AB01> { [ NoSymbol, NoSymbol, 0x100017F, 0x1001E9B ] };
// long s, long s dot
key <AB03> { [ NoSymbol, NoSymbol, cabovedot, Cabovedot ] };
key <AB05> { [ NoSymbol, NoSymbol, babovedot, Babovedot ] };
key <AB07> { [ NoSymbol, NoSymbol, mabovedot, Mabovedot ] };
include "level3(ralt_switch)"
};
-
Use a text expandor and it will auto correct to add all the silly accents for you. Also, 100% of Irish people speak English. Most don't speak Irish very well. You are wasting your life. You could be learning Japanese or Korean or something instead.
-
Use a text expandor and it will auto correct to add all the silly accents for you.
No.
Also, 100% of Irish people speak English. Most don't speak Irish very well. You are wasting your life. You could be learning Japanese or Korean or something instead.
Coming from an Englishman, this is particularly rich.
-
Use a text expandor and it will auto correct to add all the silly accents for you.
No.
Also, 100% of Irish people speak English. Most don't speak Irish very well. You are wasting your life. You could be learning Japanese or Korean or something instead.
Coming from an Englishman, this is particularly rich.
Thork set a president for this kind of thing.
-
I made a futhorc keyboard layout! This one does not inherit from any existing layout since its only purpose is to type Old English using runes, which didn't tend to use punctuation, although I did include numbers because they seem kind of useful. The layout is based on phonetic correspondence (or similarity) to QWERTY, but I relegated the pseudo-runes, īor, cweorð and stan, to the punctuation keys to the right where they can go mostly untouched. Cealc, being just a variant of calc which is not really necessary, is typed as Shift+calc.
With this layout, I can now say that ᚦᚩᚱᛣ ᛁᛋ ᚪᛏᚩᛚ.
xkb_symbols "basic" {
name[Group1]= "Old English (Futhorc)";
key <AE01> { [ 1 ] };
key <AE02> { [ 2 ] };
key <AE03> { [ 3 ] };
key <AE04> { [ 4 ] };
key <AE05> { [ 5 ] };
key <AE06> { [ 6 ] };
key <AE07> { [ 7 ] };
key <AE08> { [ 8 ] };
key <AE09> { [ 9 ] };
key <AE10> { [ 0 ] };
key <AD01> { [ U16C7 ] }; // eoh
key <AD02> { [ U16B9 ] }; // wynn
key <AD03> { [ U16D6 ] }; // ehwaz
key <AD04> { [ U16B1 ] }; // rad
key <AD05> { [ U16CF ] }; // tiwaz
key <AD06> { [ U16A3 ] }; // yr
key <AD07> { [ U16A2 ] }; // ur
key <AD08> { [ U16C1 ] }; // is
key <AD09> { [ U16A9 ] }; // os
key <AD10> { [ U16C8 ] }; // peorth
key <AD11> { [ U16E2 ] }; // cweorth
key <AD12> { [ U16E5 ] }; // stan
key <AC01> { [ U16AA ] }; // ac
key <AC02> { [ U16CB ] }; // sigel
key <AC03> { [ U16DE ] }; // daeg
key <AC04> { [ U16A0 ] }; // feoh
key <AC05> { [ U16B7 ] }; // gyfu
key <AC06> { [ U16BB ] }; // haegl
key <AC07> { [ U16C4 ] }; // ger
key <AC08> { [ U16DF ] }; // ethel
key <AC09> { [ U16DA ] }; // lagu
key <AC10> { [ U16E0 ] }; // ear
key <AC11> { [ U16E1 ] }; // ior
key <AB01> { [ U16AB ] }; // aesc
key <AB02> { [ U16C9 ] }; // eolhx
key <AB03> { [ U16B3 ] }; // cen
key <AB04> { [ U16A6 ] }; // thorn
key <AB05> { [ U16D2 ] }; // beorc
key <AB06> { [ U16BE ] }; // nyd
key <AB07> { [ U16D7 ] }; // mann
key <AB08> { [ U16DD ] }; // Ing
key <AB09> { [ U16E3, U16E4 ] }; // calc, cealc
key <AB10> { [ U16B8 ] }; // gar
};
-
Behold! My new enieplfr keyboard layout. I use a ThinkPad T14, which has the PrtSc key right next to AltGr.
(https://i.pha.lt/t14)
Now, I never use the PrtSc key, but I do type in multiple languages, so I decided to put it to good use. In technical terms, pressing a key on its own is level 1, the Shift key is a level 2 shift, and AltGr is a level 3 shift. Pressing Shift and AltGr together gives a level 4 shift, giving 4 different characters a key can produce.
In an X keyboard layout, one can also designate a level 5 shift key, which combines with Shift and AltGr to give 8 different characters per key. I have assigned this role to PrtSc, with the following behaviour:
- AltGr functions as the ie_ansi keyboard layout I posted previously, which provides useful characters for both Irish and French. I have also added guillemets and non-breaking spaces for use in weirdo French quotes.
- PrtSc functions as the AltGr key on a standard Polish "programmer's" keyboard.
- Pressing AltGr and PrtSc together produces circumflex vowels as well as ç, which are some of the less common French letters. This isn't as awkward as it sounds because the two keys are adjacent and fairly small, so I can press them both with one thumb.
- Additionally, I have changed the backtick key to function as a dead key for the grave accent, which is also used in French.
- The remaining French characters — æ, œ and vowels with diaereses — are not included in this layout. They are relatively uncommon, so typing them using XCompose sequences is not a great burden.
The big advantage of all this is that, if neither AltGr nor PrtSc is depressed, the keyboard still functions like a standard US layout, except for the dead grave key, which I consider acceptable because I rarely use backticks.
Without further ado, I present to ye the enieplfr layout, courtesy of yours truly.
xkb_symbols "basic" {
include "us(basic)"
name[Group1] = "English/Irish/Polish/French";
// grave accent
key.type[Group1] = "TWO_LEVEL";
key <TLDE> { [ dead_grave, asciitilde ] };
// Euro on 5 key
key.type[Group1] = "FOUR_LEVEL";
key <AE05> { [ NoSymbol, NoSymbol, EuroSign, cent ] };
// Q row
key.type[Group1] = "EIGHT_LEVEL";
key <AD03> { [ NoSymbol, NoSymbol, eacute, Eacute, eogonek, Eogonek, ecircumflex, Ecircumflex ] };
key.type[Group1] = "FOUR_LEVEL";
key <AD04> { [ NoSymbol, NoSymbol, 0x100027C, NoSymbol ] };
// long r
key <AD05> { [ NoSymbol, NoSymbol, tabovedot, Tabovedot ] };
key.type[Group1] = "EIGHT_LEVEL";
key <AD07> { [ NoSymbol, NoSymbol, uacute, Uacute, NoSymbol, NoSymbol, ucircumflex, Ucircumflex ] };
key <AD08> { [ NoSymbol, NoSymbol, iacute, Iacute, NoSymbol, NoSymbol, icircumflex, Icircumflex ] };
key <AD09> { [ NoSymbol, NoSymbol, oacute, Oacute, oacute, Oacute, ocircumflex, Ocircumflex ] };
key.type[Group1] = "FOUR_LEVEL";
key <AD10> { [ NoSymbol, NoSymbol, pabovedot, Pabovedot ] };
// A row
key.type[Group1] = "EIGHT_LEVEL";
key <AC01> { [ NoSymbol, NoSymbol, aacute, Aacute, aogonek, Aogonek, acircumflex, Acircumflex ] };
key <AC02> { [ NoSymbol, NoSymbol, sabovedot, Sabovedot, sacute, Sacute ] };
key.type[Group1] = "FOUR_LEVEL";
key <AC03> { [ NoSymbol, NoSymbol, dabovedot, Dabovedot ] };
key <AC04> { [ NoSymbol, NoSymbol, fabovedot, Fabovedot ] };
key <AC05> { [ NoSymbol, NoSymbol, gabovedot, Gabovedot ] };
key.type[Group1] = "EIGHT_LEVEL";
key <AC09> { [ NoSymbol, NoSymbol, NoSymbol, NoSymbol, lstroke, Lstroke ] };
// Z row
key <AB01> { [ NoSymbol, NoSymbol, 0x100017F, 0x1001E9B, zabovedot, Zabovedot ] };
// long s, long s dot
key <AB02> { [ NoSymbol, NoSymbol, NoSymbol, NoSymbol, zacute, Zacute ] };
key <AB03> { [ NoSymbol, NoSymbol, cabovedot, Cabovedot, cacute, Cacute, ccedilla, Ccedilla ] };
key.type[Group1] = "FOUR_LEVEL";
key <AB05> { [ NoSymbol, NoSymbol, babovedot, Babovedot ] };
key.type[Group1] = "EIGHT_LEVEL";
key <AB06> { [ NoSymbol, NoSymbol, NoSymbol, NoSymbol, nacute, Nacute ] };
key.type[Group1] = "FOUR_LEVEL";
key <AB07> { [ NoSymbol, NoSymbol, mabovedot, Mabovedot ] };
key <AB08> { [ NoSymbol, NoSymbol, guillemotleft ] };
key <AB09> { [ NoSymbol, NoSymbol, guillemotright ] };
// spaces
key <SPCE> { [ space, space, nobreakspace, nobreakspace ] };
include "level3(ralt_switch)"
key <PRSC> {
type[Group1] = "ONE_LEVEL",
symbols[Group1] = [ ISO_Level5_Shift ]
};
include "level5(modifier_mapping)"
};
-
I modified it further to create an enieplfreo layout that also does Esperanto, by removing characters only needed for the old style of writing Irish and replacing them with Esperanto's circumflexed consonants.
xkb_symbols "basic" {
include "us(basic)"
name[Group1] = "English/Irish/Polish/French/Esperanto";
// grave accent
key.type[Group1] = "TWO_LEVEL";
key <TLDE> { [ dead_grave, asciitilde ] };
// Euro on 5 key
key.type[Group1] = "FOUR_LEVEL";
key <AE05> { [ NoSymbol, NoSymbol, EuroSign, cent ] };
// Q row
key <AD02> { [ NoSymbol, NoSymbol, ubreve, Ubreve ] };
key.type[Group1] = "EIGHT_LEVEL";
key <AD03> { [ NoSymbol, NoSymbol, eacute, Eacute, eogonek, Eogonek, ecircumflex, Ecircumflex ] };
key <AD07> { [ NoSymbol, NoSymbol, uacute, Uacute, NoSymbol, NoSymbol, ucircumflex, Ucircumflex ] };
key <AD08> { [ NoSymbol, NoSymbol, iacute, Iacute, NoSymbol, NoSymbol, icircumflex, Icircumflex ] };
key <AD09> { [ NoSymbol, NoSymbol, oacute, Oacute, oacute, Oacute, ocircumflex, Ocircumflex ] };
// A row
key <AC01> { [ NoSymbol, NoSymbol, aacute, Aacute, aogonek, Aogonek, acircumflex, Acircumflex ] };
key <AC02> { [ NoSymbol, NoSymbol, scircumflex, Scircumflex, sacute, Sacute ] };
key.type[Group1] = "FOUR_LEVEL";
key <AC05> { [ NoSymbol, NoSymbol, gcircumflex, Gcircumflex ] };
key <AC06> { [ NoSymbol, NoSymbol, hcircumflex, Hcircumflex ] };
key <AC07> { [ NoSymbol, NoSymbol, jcircumflex, Jcircumflex ] };
key.type[Group1] = "EIGHT_LEVEL";
key <AC09> { [ NoSymbol, NoSymbol, NoSymbol, NoSymbol, lstroke, Lstroke ] };
// Z row
key <AB01> { [ NoSymbol, NoSymbol, NoSymbol, NoSymbol, zabovedot, Zabovedot ] };
key <AB02> { [ NoSymbol, NoSymbol, NoSymbol, NoSymbol, zacute, Zacute ] };
key <AB03> { [ NoSymbol, NoSymbol, ccircumflex, Ccircumflex, cacute, Cacute, ccedilla, Ccedilla ] };
key <AB06> { [ NoSymbol, NoSymbol, NoSymbol, NoSymbol, nacute, Nacute ] };
key.type[Group1] = "FOUR_LEVEL";
key <AB08> { [ NoSymbol, NoSymbol, guillemotleft ] };
key <AB09> { [ NoSymbol, NoSymbol, guillemotright ] };
// spaces
key <SPCE> { [ space, space, nobreakspace, nobreakspace ] };
include "level3(ralt_switch)"
key <PRSC> {
type[Group1] = "ONE_LEVEL",
symbols[Group1] = [ ISO_Level5_Shift ]
};
include "level5(modifier_mapping)"
};
-
I've been making some more tweaks. It now supports all letters and diacritics used in the 10 most widely spoken languages in the EU, plus Esperanto. The placement of keys is mostly mnemonic — AltGr gives Western European variants of letters, PrtSc Eastern European, and AltGr+PrtSc less common ones. In some cases, the placement is based on the keyboard layout normally used for typing that language. There are now two dead keys, for grave and tilde accents.
There is a point of diminishing returns trying to support more European languages. I could try to include å for Swedish, č for Czech and ø for Danish, but all of the logical places for those are taken, so it would be difficult to remember. XCompose is more convenient for these less common languages, since it involves more keystrokes but is more intuitive to use.
I have named this new layout europa, for the great number of European languages it now supports — more languages than the "US International" layout, and more intuitive to use.
xkb_symbols "basic" {
include "us(basic)"
name[Group1] = "Europa";
// grave accent
key.type[Group1] = "TWO_LEVEL";
key <TLDE> { [ dead_grave, dead_tilde ] };
// inverted exclamation mark
key.type[Group1] = "FOUR_LEVEL";
key <AE01> { [ NoSymbol, NoSymbol, exclamdown, exclamdown ] };
// Euro on 5 key
key <AE05> { [ NoSymbol, NoSymbol, EuroSign, cent ] };
// Q row
key <AD02> { [ NoSymbol, NoSymbol, ubreve, Ubreve ] };
key.type[Group1] = "EIGHT_LEVEL";
key <AD03> { [ NoSymbol, NoSymbol, eacute, Eacute, eogonek, Eogonek, ecircumflex, Ecircumflex ] };
key <AD07> { [ NoSymbol, NoSymbol, uacute, Uacute, NoSymbol, NoSymbol, ucircumflex, Ucircumflex ] };
key <AD08> { [ NoSymbol, NoSymbol, iacute, Iacute, NoSymbol, NoSymbol, icircumflex, Icircumflex ] };
key <AD09> { [ NoSymbol, NoSymbol, oacute, Oacute, oacute, Oacute, ocircumflex, Ocircumflex ] };
key <AD11> { [ NoSymbol, NoSymbol, udiaeresis, Udiaeresis, abreve, Abreve, udoubleacute, Udoubleacute ] };
key <AD12> { [ NoSymbol, NoSymbol, NoSymbol, NoSymbol, icircumflex, Icircumflex ] };
key <BKSL> { [ NoSymbol, NoSymbol, NoSymbol, NoSymbol, acircumflex, Acircumflex ] };
// A row
key <AC01> { [ NoSymbol, NoSymbol, aacute, Aacute, aogonek, Aogonek, acircumflex, Acircumflex ] };
key <AC02> { [ NoSymbol, NoSymbol, ssharp, ssharp, sacute, Sacute, scircumflex, Scircumflex ] };
key.type[Group1] = "FOUR_LEVEL";
key <AC05> { [ NoSymbol, NoSymbol, gcircumflex, Gcircumflex ] };
key <AC06> { [ NoSymbol, NoSymbol, hcircumflex, Hcircumflex ] };
key <AC07> { [ NoSymbol, NoSymbol, jcircumflex, Jcircumflex ] };
key.type[Group1] = "EIGHT_LEVEL";
key <AC09> { [ NoSymbol, NoSymbol, oe, OE, lstroke, Lstroke ] };
key <AC10> { [ NoSymbol, NoSymbol, odiaeresis, Odiaeresis, U0219, U0218, odoubleacute, Odoubleacute ] };
key <AC11> { [ NoSymbol, NoSymbol, adiaeresis, Adiaeresis, U021B, U021A ] };
// Z row
key <AB01> { [ NoSymbol, NoSymbol, ae, AE, zabovedot, Zabovedot ] };
key <AB02> { [ NoSymbol, NoSymbol, NoSymbol, NoSymbol, zacute, Zacute ] };
key <AB03> { [ NoSymbol, NoSymbol, ccedilla, Ccedilla, cacute, Cacute, ccircumflex, Ccircumflex ] };
key <AB06> { [ NoSymbol, NoSymbol, ntilde, ntilde, nacute, Nacute ] };
key.type[Group1] = "FOUR_LEVEL";
key <AB08> { [ NoSymbol, NoSymbol, guillemotleft, guillemotleft ] };
key <AB09> { [ NoSymbol, NoSymbol, guillemotright, guillemotright ] };
key <AB10> { [ NoSymbol, NoSymbol, questiondown, questiondown ] };
// spaces
key <SPCE> { [ space, space, nobreakspace, nobreakspace ] };
include "level3(ralt_switch)"
key <PRSC> {
type[Group1] = "ONE_LEVEL",
symbols[Group1] = [ ISO_Level5_Shift ]
};
include "level5(modifier_mapping)"
};