UTF8 Keymaping

Peter Hoffmann ph at peter-hoffmann.com
Tue Apr 19 14:54:09 UTC 2005


Bryn Salisbury schrieb:
> Hello,
> 
> Having started to use Ubuntu with the cy_GB localisation, I tried to map
> the characters â, ê, î, ô, û, ŵ and ŷ to a simpler keypress.
> 
> Having mapped the right "windows" key to being a meta key, I've now
> managed to reduce it to 4 keypresses (meta+$letter, shift+6) but what
> I'd like to be able to do is to have it so that "meta+o" prints out an
> "ô" (and so on).
> I'm now however stuck as how best to proceed, can anyone help me with this?

I had the same problemes with an american keyboard and the german
umlauts. I created a .Xmodmap file in my home directory:

   keycode 113=Mode_switch
   clear mod1
   clear mod2
   clear mod3
   clear mod4
   add mod1 = Alt_L
   add mod2 = Num_Lock
   add mod3 = Alt_R
   add mod4 = Mode_switch
   keysym a = a A adiaeresis Adiaeresis
   keysym o = o O odiaeresis Odiaeresis
   keysym u = u U udiaeresis Udiaeresis
   keysym s = s S ssharp

You have to customize the keysum lines to your needs[1] and then load
the file with xmodmap .Xmodmap. Then Meta-a becomes ä etc.

Regards Peter

[1]
194 0xc2        Â       Acircumflex
202 0xca        Ê       Ecircumflex
206 0xce        Î       Icircumflex
212 0xd4        Ô       Ocircumflex
219 0xdb        Û       Ucircumflex
226 0xe2        â       acircumflex
234 0xea        ê       ecircumflex
238 0xee        î       icircumflex
244 0xf4        ô       ocircumflex
251 0xfb        û       ucircumflex





More information about the ubuntu-users mailing list