I wish I could design a keyboard layout of my own (specifying symbols for each the key to be entered in case it is pressed alone, with Shift or with AltGr) and set it up among all the other layouts in my XUbuntu 11.04 system. How to do this?
This link should be useful http://ubuntuforums.org/showthread.php?t=1654199&highlight=.Xmodmap
Please vote up if this is useful for you
ADDED the info found in the link, all credit to the UF OP. Mind it, the question was opned a while ago, things tend to change
Ubuntu 10.10 I use a local keyboard with us and Thai layout. The us layout is ok for me, but I like to have some additional german characters like "äöü ÄÖÜ" This can easy be implemented with xmodmap, but if you switch to the second layout, you will observe some strange results.
After plenty of googling, I found an IMHO easy and perfect solution: create and use your custom keyboard!
1) /usr/share/X11/xkb/symbols/ choose your nearest preference, in my case "us" and save it with a new name: "us-de"
2) delete anything, which you don't need, and change, what ever you like. My file for "us-de":
3) /usr/share/X11/xkb/rules/evdev.xml Modify "evdev.xml" so your custom keyboard will be recognised: search for "" and
add the following just previous to ""
"us-de" is the filename of the new keyboard layout in X11/xkb/symbols "US-DE" this will appear eg. in the indicator applet "ASCII with german" must coincide with the text at the begin of your file: name[Group1]= "ASCII with german"; This text will also appear as comment under "Layouts" if you choose "eng" your layout will be shown in System->Preferences->Keyboard->tab Layouts->Add->By Language->English under "Variants"
4) log out and log in again, and check System->Preferences->Keyboard->tab Layouts->Add->By Language->English if you can find your custom layout, happy! You are ready to go! Select your first and second layou here. Add a keyboard switcher applet here under "options" you can also disable the CapsLock key.
5) the default keyboard will annoy you and sometime reappear... If you like to get rid of this, edit /var/cache/gdm/$USER/dmrc and place anything existing as your new default: "Layout=us-de" then reboot..
I post this, as it is easy, but difficult to find out, and perhaps to make somebody happy... Feedback and hints to improve are welcome!