![[personal profile]](https://www.dreamwidth.org/img/silk/identity/user.png)
I have already had a fiddle with xkb. I found it irritating that I had to guess what keyboard setting I had to use to get the multimedia keys on the Dell Latitude I use to work. As it turns out, I wrote an entire keyboard description, which is now in the standard xkb-config project. So my name is on a very small piece of Linux. Yay me!
And yet, I was not satisfied. You see, I have always had this idea that since a keyboard turns an arbitrary keystroke into an arbitrary character on the screen, that you should be able to tell it precisely what characters result from a given set of keystrokes.
It is, of course, not that simple. In windows, for example, if you don't have the right tool to hack up something, then you're stuck with the (undocumented) Windows en intl keyboard. Which has its charms, but is tight around the shoulders and itches something shocking. In Linux, you actually have the option of doing something about it, that is, the tools are right there, but almost no-one knows how to use them. There's xmodmap, for example. That seems to be depricated, though, in favour of xkb. Don't get me wrong, xkb will do wonderful things, but you have to know what you're doing. I reckon that there are about a couple of dozen people on the planet who have a deep understanding of how xkb and its myriad of config files works. I think that I am among them... or at least, I aspire to be, one day.
Again, there is no documentation. (Or what there is is patchy and less than useful. Maybe I shall have to make that a project, in my copious free time.) It is, while more powerful than xmodmap, also more restricted because there is, as far as I can see, no way to have a local configuration. That is, there is no way to have a user set of configs which a user can select from. If you want to add a new keyboard configuration, or geometry, or variant, or whatever, then you have to hack it into place in /etc/X11/xkb/*/*. And be ready for it to be overwritten next time xkb-config is upgraded.
Anyway, I've hacked up a keyboard which almost suits me. It has the standard keys in their normal places (for the us(intl) variant), but gets interesting in the upper register.
Oh, you don't know what I'm talking about? Well, the international keyboards have two extra control keys. Mode shift (usually on the right ALT key) is another shift level (so you can type a key, SHIFT+key, MODE+key or SHIFT+MODE+key, and get four different characters), and COMPOSE (often on right CTRL, unless it's on right MENU or WINDOWS instead...) means that you can type sequences of keys to get one character. This is extended even more with dead keys — that is, keys which wait for you to type another key, then modify the result.
For example, “<COMPOSE> a e” gives you ‘æ’, the apostrophe key is, in intl keyboards, dead_acute, so that “' a” gives you ‘á’, and “<MODE>+?” gives you ‘¿’.
The defaults are sometimes... odd. Characters are stuffed in there, assuming that intl will do for all foreigners, and so must be universal, containing every character needed. “<MODE>+p”, for example, is ‘ö‘. Why? Because “<MODE>+o” is taken for ‘ó’. It's full of warts.
So, I wrote my own keyboard. I'm calling it “Paleographic Roman”, because that is basically what it is designed around dealing with. Because I like Latin, Old English and Irish Gaelic, those languages are dealt with especially, but Norse and other European languages should be coped with more or less easily. I tried to make it that if <MODE>+x gives a character, that <MODE>+<SHIFT>+x will give you the uppercase form if available. All characters are in the standard Unicode set. While I have chosen characters from the MUFI standard set, no character is included if it is in the Private Use Area. And preference is given to characters, as diacritics can be obtained through dead keys and Compose. But, given all that, here's what I have:
x | S+x | M+x | M+S+x |
---|---|---|---|
a | A | æ (æsc, ae ligature) | Æ (Æsc, AE ligature) |
b | B | ||
c | C | © (copyright) | ¢ (cents) |
d | D | ð (eth) | Ð (ETH) |
e | E | ə (schwa) | Ə (SCWHA) |
f | F | ||
g | G | ᵹ (insular g) | ɡ (open loop g, phonetic) |
h | H | ƕ (hwair — Gothic) | Ƕ (HWAIR) |
i | I | ı (dotless i) | İ (I with dot) |
j | J | ij (ij ligature) | IJ (IJ ligature) |
k | K | ĸ (kra, Icelandic) | |
l | L | ł (polish l variant, and vel contraction | Ł |
m | M | µ (mu) | |
n | N | ŋ (eng) | Ŋ (Captial ENG) |
o | O | ø (oslash) | Ø (Capital Oslash) |
p | P | ¶ (pilcrow, or paragraph mark) | § (Section) |
q | Q | ||
r | R | ʀ (final ‘r’ in Norse nominatives) | Ʀ (Norse letter YR) |
s | S | ß (eszet, ſs ligature) | ſ (long s) |
t | T | þ (thorn) | Þ (Capital Thorn) |
u | U | ú | Ú |
v | V | ℣ (Versicle) | |
w | W | ƿ (wynn, OE ‘w’) | Ƿ (Capital Wynn) |
x | X | ||
y | Y | ȝ (yogh, Middle English g/y) | Ȝ (Capital Yogh) |
z | Z | ʒ (ezh, not 3, ᵹ or ȝ) | Ʒ (Capital Ezh) |
` (dead grave) | ~ (dead tilde) | ` (grave character) | ~ (tilde character) |
1 | ! | ¡ | ′ (prime) |
2 | @ | ² | ˝ (double acute) |
3 | # | £ | ³ |
4 | $ | ¤ (universal currency symbol) | |
5 | % | € (Euro) | |
6 | ^ (dead_circumflex) | ^ (circumflex character) | |
7 | & | ⁊ (tirolean et | (dead hook, but it doesn't seem to show) |
8 | * | ¾ | ˛ (dead_ogonek) |
9 | ( | ‘ (single open quote) | ˘ (dead_breve) |
0 | ) | ’ (single close quote) | ˚ (dead ring accent, as in å) |
- (minus) | _ (underscore) | (dead macron, as in ā) | (dead belowdot accent) |
= (equals) | + (plus) | × (times, or accented syllable) | ÷ (division, or est) |
[ (open square bracket) | { | ‘ (open single quote) | “ (open double quote) |
] (close square bracket) | } | ’ (close single quote) | ” (close double quote) |
\ (backslash) | | | † (dagger) | ‡ (double dagger) |
; (semicolon) | : (colon) | ˛ (dead ogonek) | ° (degree) |
' (dead acute) | " (dead diaresis) | ' (apostrophe character) | " (ditto character) |
, | < | ¸ (dead_cedilla, as in ç) | « (open guillemet) |
. | > | ˙ (dead overdot) | » (close guillemet) |
/ | ? | ¿ | (dead hook accent) |
So now I can type ¡Holá!, or Tá mé i'mo tuirseaċt ⁊ táim ag obair fós, or Þorfinnʀ ⁊ Ranúlfʀ, or Hƿæt! Ƿé ᵹardéna in ᵹéar-dǽᵹum, or Fōȝt he wiþ þat Ȝrēne kniȝt ariȝt, all straight from the keyboard, no further fiddling needed! (Well, some, because some programs don't deal with some Unicode combinations as they should, but nevermind, it works well enough, most of the time.)