Customized keyboard layout doesn't work since upgrade to 8.10
Johnny Rosenberg
gurus.knugum at gmail.com
Sun Nov 23 10:39:09 UTC 2008
*Background*
I made my own keyboard layout maybe a year ago, making it possible to reach
a lot of special characters directly from the keyboard by combining keys
with Shift and/or AltGr (the right Alt key on a Swedish keyboard). Every key
had four different characters, I removed all the numbers on the first row
(above the qwerty row); why have them at two different places? I also made
it possible to type ←↓→↓ with the arrow keys combined with AltGr, and the
arrow keys still work like they should when not combined with AltGr.
I was very happy with it and now I am very used to it too and I really want
it back.
*How I did it*
It was pretty easy, once getting all the info I needed. I created a new
file, called *se-Johnny*. That file looks like this:
partial alphanumeric_keys
xkb_symbols "se-Johnny" {
name[Group1]="Sweden - Johnny Rosenberg";
include "se"
key.type[Group1]="FOUR_LEVEL";
key <LSGT> {[less, greater, lessthanequal, greaterthanequal ]};
key <AB01> {[z, Z, ssharp, U1D10A ]};
key <AB02> {[x, X, U2610, U2612 ]};
key <AB03> {[c, C, U2103, copyright ]};
key <AB04> {[v, V, U2669, U2669 ]};
key <AB05> {[b, B, Greek_beta, musicalflat ]};
key <AB06> {[n, N, U207F, U207F ]};
key <AB07> {[m, M, mu, mu ]};
key <AB08> {[comma, semicolon, dead_cedilla, dead_ogonek ]};
key <AB09> {[period, colon, ellipsis, ellipsis ]};
key <AB10> {[minus, underscore, endash, emdash ]};
key <AC01> {[a, A, Greek_alpha, Greek_alpha ]};
key <AC02> {[s, S, Greek_sigma, Greek_SIGMA ]};
key <AC03> {[d, D, eth, ETH ]};
key <AC04> {[f, F, Greek_phi, U2109 ]};
key <AC05> {[g, G, Greek_gamma, U1D11E ]};
key <AC06> {[h, H, thorn, THORN ]};
key <AC07> {[j, J, U1D106, U1D10E ]};
key <AC08> {[k, K, U1D107, U1D101 ]};
key <AC09> {[l, L, Greek_lambda, U1D102 ]};
key <AC10> {[odiaeresis, Odiaeresis, oslash, Oslash ]};
key <AC11> {[adiaeresis, Adiaeresis, ae, AE ]};
key <BKSL> {[apostrophe, asterisk, U223F, multiply ]};
key <RTRN> {[Return, Return, U21B5, paragraph ]};
key <AD01> {[q, Q, U1D10B, U1D109 ]};
key <AD02> {[w, W, Greek_omega, Greek_OMEGA ]};
key <AD03> {[e, E, EuroSign, cent ]};
key <AD04> {[r, R, radical, registered ]};
key <AD05> {[t, T, Greek_tau, trademark ]};
key <AD06> {[y, Y, U2663, U2662 ]};
key <AD07> {[u, U, U2660, U2661 ]};
key <AD08> {[i, I, U2071, U2139 ]};
key <AD09> {[o, O, degree, infinity ]};
key <AD10> {[p, P, Greek_pi, phonographcopyright ]};
key <AD11> {[aring, Aring, U2300, U2295 ]};
key <AD12> {[dead_diaeresis, dead_asciicircum, asciitilde, dead_caron ]};
key <TLDE> {[section, U2620, U260F, telephone ]};
key <AE01> {[exclam, U263A, exclamdown, U2639 ]};
key <AE02> {[quotedbl, rightdoublequotemark,at, leftdoublequotemark ]};
key <AE03> {[numbersign, musicalsharp, sterling, U266E ]};
key <AE04> {[at, currency, dollar, U1D10C ]};
key <AE05> {[percent, U2030, yen, because ]};
key <AE06> {[ampersand, ampersand, ampersand, therefore ]};
key <AE07> {[slash, bar, braceleft, slash ]};
key <AE08> {[parenleft, U208D, bracketleft, U207D ]};
key <AE09> {[parenright, U208E, bracketright, U207E ]};
key <AE10> {[equal, U2248, braceright, notequal ]};
key <AE11> {[plus, question, backslash, questiondown ]};
key <AE12> {[dead_acute, dead_grave, acute, grave ]};
key <DOWN> {[Down, Down, downarrow, Down ]};
key <LEFT> {[Left, Left, leftarrow, U2B04 ]};
key <RGHT> {[Right, Right, rightarrow, U21E8 ]};
key <UP> {[Up, Up, uparrow, Up ]};
key <KPDV> {[slash, division, onefifth, twofifths ]};
key <KPMU> {[asterisk, periodcentered, threefifths, fourfifths ]};
key <KPSU> {[minus, fivesixths, U208B, U207B ]};
key <KPAD> {[plus, onesixth, U208A, U207A ]};
key <KPEN> {[Return, Return, Return, Return ]};
key <KP0> {[0, plusminus, zerosubscript, zerosuperior ]};
key <KP1> {[1, oneeighth, onesubscript, onesuperior ]};
key <KP2> {[2, onequarter, twosubscript, twosuperior ]};
key <KP3> {[3, threeeighths, threesubscript, threesuperior ]};
key <KP4> {[4, onehalf, foursubscript, foursuperior ]};
key <KP5> {[5, fiveeighths, fivesubscript, fivesuperior ]};
key <KP6> {[6, threequarters, sixsubscript, sixsuperior ]};
key <KP7> {[7, seveneighths, sevensubscript, sevensuperior ]};
key <KP8> {[8, onethird, eightsubscript, eightsuperior ]};
key <KP9> {[9, twothirds, ninesubscript, ninesuperior ]};
key <KPDL> {[comma, period, U2A7D, U2A7E ]};
};
I placed the file in my home directory making it easy for me to make
changes. Then i created the link */usr/share/X11/xkb/symbols/se-Johnny*,
pointing to my file.
Next, I added the following in */usr/share/X11/xkb/rules/base.lst* below the
*! layout* row:
se-Johnny Sweden by Johnny Rosenberg
The last step was to add the following somewhere between *<layoutlist>* and
*</layoutlist>* in */usr/share/X11/xkb/rules/base.xml*:
<layout>
<configItem>
<name>se-Johnny</name>
<shortDescription>JR</shortDescription>
<description>Johnny Rosenberg</description>
</configItem>
</layout>
After that I just had to click *System → Settings → Keyboard → Layouts*,
then add my new settings by selecting *Johnny Rosenberg* from the country
list. I planned to just make it a variant of the Swedish layout, but I found
this easier when making changes, but maybe I will reconsider one day.
This was all I needed to make it work with 8.04 and earlier versions of
Ubuntu.
*Problems with the new Interpid Ibex*
The obvious problem is that I can't add my own layout, since *Johnny
Rosenberg* is not in the list of available countries anymore. When I just
upgraded to 8.10, it still worked though. *se-Johnny* was one of the two in
the layout list at *System → Settings → Keyboard → Layouts*, but if I
removed it I couldn't put it back. First I thought that "well, I'd better
just leave it as it is, since it's still working", but after a while I found
that my keyboard layout was, for no obvious reason, suddenly replaced by the
standard Swedish layout. After logging out and then in again, I had my own
layout again, for a while, until it happened again and so on. Obviously
something was wrong.
It seems like they made some changes for 8.10, but I couldn't find any good
documents telling me how to adapt to the new stuff. All I found was that *
/usr/share/X11/xkb/rules/base.lst* and
*/usr/share/X11/xkb/rules/base.xml*seems to be not used anymore.
Instead
*/usr/share/X11/xkb/rules/evdev.lst* and */usr/share/X11/xkb/rules/evdev.xml
* seems to be the replacements. Taking a look at these, I found that they
seem to contain the same things as the old files, so I just modified them
the same way as I did with the old way.
The only thing I noticed after that was that *se-Johnny* in the layout list
at *System → Settings → Keyboard → Layouts* was replaced by *Johnny
Rosenberg*. However, *Johnny Rosenberg* was still not in the list of
countries at *System → Settings → Keyboard → Layouts* → +.
*The actual question*
What am I missing here? Is there something else I need to do to make this
work?
Best regards
Johnny Rosenberg
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.ubuntu.com/archives/ubuntu-users/attachments/20081123/98f1cdff/attachment.html>
More information about the ubuntu-users
mailing list