Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Main question: how to make custom key mappings / keyboard layouts in Ubuntu 12.04

In English I type in Dvorak.

I need to type Hebrew sometimes so in Windows7 I made a custom layout Hebrew-phonetic based on the Dvorak layout.

It's pretty easy with MS Easy Keyboard Layout Creator and a unicode lookup chart.

I'm wondering how to do the same thing in Ubuntu 12.04.

EditJune 6: I've tried editing the appropriate file (for Hebrew this is listed "il") under usr/share/X11/xkb/symbols, but so far on reboot that's only caused errors when attempt to invoke the Hebrew keyboard option. My new entry in the "il" file is not showing up in the options. My edit consists of adding a new bloc for my own sub-variant under Hebrew; partial alphanumeric keys, xkb symbols &c. I'm specifying with Unicode U+xxxx. I actually took out all the "+" signs though after I saw a page detailing that it understood Unicode in the form Uxxxx. Not sure if it matters.

Edit June 7: almost got it. You need to edit the evdev.xml file in ...\xkb\rules\ to reflect the new entry. there were some errors in mine so setup was giving errors. so went to debugging mode and cleared everything but a few keys out of my new variant's entry in the ...\symbols\il file. that worked; i got some hebrew letters. there must have been some bad unicode or regex entries. so just have to go through line by line. i'll try to compose an answer tomorrow.

Bonus points for Chinese/Pinyin input for Dvorak people

I also need to know how to get Chinese Pinyin input to interpret Dvorak input. I figured that out in W7 some months ago but don't remember how I did it. Anyways, it's going to be different for Ubuntu.

Appendix: kulicuu's hebrew-dvorak phonetic mapping (for those interested)

(Israeli Hebrew, no dageshim)

Not really relevant to the answer, but for those interested in my mapping system ( I think it's pretty cool and I think that all English first language learners of Hebrew should use it for word processing rather than the native Hebrew layout, which will totally wreck your touch typing brain module with dissonance) here it is. Note: mostly phonetic, but when this breaks down we use ideographic affinity(u->het, e-> shin, v-> tav, c- caf) ; and 4 israeli hebrew letters map from multiple roman letters: p,f -> pe; w,o-> vav; j,i-> yod; c,k-> caf (one ideographic the other phonetic; (q -> qof); note2: make sure to program that shift + letter-that-has-no-sofit-form yields default form (instead of nothing), otherwise you have to be superhumanly precise with timing shift key activation on sofit forms.

  • a -> aleph,
  • b -> bet,
  • g -> gimmel,
  • d -> daled,
  • h -> heh, (these are obvious phonetically)
  • (w,o)-> vav; (that's right both w and o keys map to vav. we reserve v for tav and w is more originally correct--archaically it was pronounced that way.)
  • z-> zayin
  • u -> het (we use ideographical mapping for hebrew letters with no phonetic counterpart in english; typically some reflection or rotation is involved)
  • t-> tet
  • (j, i ) -> yod; (we reserve y or ayin, giving precedence to the familial affinity of j for yod, and of course the i mapping is obvious)
  • (c, k) -> caf; shift + c,k for sofit form
  • l-> lamed
  • m-> mem; + shift for sofit form
  • n-> nun; " " "
  • s-> samech
  • y-> ayin
  • (f, p) -> pe; again, Israeli form so no dageshim. easy to change that if you want it. again shift + for sofit forms.
  • X-> tsadi; not phonetic, not ideographic unless you're on shrooms; it just makes sense. shift + for sofit form
  • q-> qof; as ideographic as tsadi maybe a little more so; and phonetically appopriate;
  • r-> resh
  • e-> shin ideographic from the cursive form, which is a rotation mutation of an ideographic speed rendering of the print shin; as are most of the cursive forms
  • v-> tav. reflective ideographic resemblance to cursive tav. t is taken for tet. just made sense to me to do it this way.
share|improve this question

Okay I got it working. I won't pretend to be an expert on xkb because it has a lot of capabilities I haven't yet been able to exploit, but I was able to make my own keymap to Hebrew.

This solution works but it requires some level of knowledge and skill:

  1. Edit the appropriate file in /usr/share/X11/xkb/symbols.
  2. Edit the evdev.xml file .../xkb/rules to reflect changes made in whatever file you edited under the symbols directory in step 1.
  3. Ctrl-alt-backspace periodically to check your work and debug. If new install ctrl-alt-backspace doesn't restart windows manager; you need to activate that option somewhere. I can't remember where.
    (It's a pita if not activated because sometimes windows manager crashes and there's no equivalent of task manager in Ubuntu.)

Some background links.

share|improve this answer
Edited the il (hebrew) file in the usr/share/X11/xkb/symbols directory. Made a new entry for my own and filled in values appropriately. Not work. – Wylie Кулик Jun 4 '12 at 16:12

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.