I am trying to use Xmodmap to add some german diareses/umlauts to my keyboard, but Xmodmap is not working with them (but is with other remappings).
I am following this guide: German Umlauts on US Keyboard in X (Ubuntu 10.04).
Xmodmap
I have added this to my ~/.Xmodmap
:
keysym a = a A adiaeresis Adiaeresis
keysym o = o O odiaeresis Odiaeresis
keysym u = u U udiaeresis Udiaeresis
keysym s = s S ssharp ssharp
xev
However it doesn't work. Here's the output from xev
when I press o, hold down AltGr, press o, press x:
KeyPress event, serial 34, synthetic NO, window 0x4e00001,
root 0x8e, subw 0x0, time 642618, (108,138), root:(173,190),
state 0x10, keycode 32 (keysym 0x6f, o), same_screen YES,
XLookupString gives 1 bytes: (6f) "o"
XmbLookupString gives 1 bytes: (6f) "o"
XFilterEvent returns: False
KeyRelease event, serial 37, synthetic NO, window 0x4e00001,
root 0x8e, subw 0x0, time 642644, (108,138), root:(173,190),
state 0x10, keycode 32 (keysym 0x6f, o), same_screen YES,
XLookupString gives 1 bytes: (6f) "o"
XFilterEvent returns: False
KeyPress event, serial 37, synthetic NO, window 0x4e00001,
root 0x8e, subw 0x0, time 643792, (108,138), root:(173,190),
state 0x10, keycode 108 (keysym 0xfe03, ISO_Level3_Shift), same_screen YES,
XKeysymToKeycode returns keycode: 92
XLookupString gives 0 bytes:
XmbLookupString gives 0 bytes:
XFilterEvent returns: False
KeyPress event, serial 37, synthetic NO, window 0x4e00001,
root 0x8e, subw 0x0, time 645365, (108,138), root:(173,190),
state 0x90, keycode 32 (keysym 0x0, NoSymbol), same_screen YES,
XLookupString gives 0 bytes:
XmbLookupString gives 0 bytes:
XFilterEvent returns: False
KeyRelease event, serial 37, synthetic NO, window 0x4e00001,
root 0x8e, subw 0x0, time 645409, (108,138), root:(173,190),
state 0x90, keycode 32 (keysym 0x0, NoSymbol), same_screen YES,
XLookupString gives 0 bytes:
XFilterEvent returns: False
KeyPress event, serial 37, synthetic NO, window 0x4e00001,
root 0x8e, subw 0x0, time 647660, (108,138), root:(173,190),
state 0x90, keycode 53 (keysym 0xd7, multiply), same_screen YES,
XLookupString gives 2 bytes: (c3 97) "×"
XmbLookupString gives 2 bytes: (c3 97) "×"
XFilterEvent returns: False
KeyRelease event, serial 37, synthetic NO, window 0x4e00001,
root 0x8e, subw 0x0, time 647722, (108,138), root:(173,190),
state 0x90, keycode 53 (keysym 0xd7, multiply), same_screen YES,
XLookupString gives 2 bytes: (c3 97) "×"
XFilterEvent returns: False
KeyRelease event, serial 37, synthetic NO, window 0x4e00001,
root 0x8e, subw 0x0, time 650223, (108,138), root:(173,190),
state 0x90, keycode 108 (keysym 0xfe03, ISO_Level3_Shift), same_screen YES,
XKeysymToKeycode returns keycode: 92
XLookupString gives 0 bytes:
XFilterEvent returns: False
You'll note that pressing AltGr is interpreted as ISO_Level3_Shift
, and when that and x is pressed, I get keysym 0xd7, multiply
, i.e. ×
, which is set as my 3rd level for x. So AltGr works.
$ xmodmap -pke | grep 53
keycode 53 = x X x X multiply approximate
However when I press o I get keysym 0x0, NoSymbol
, despite my 3rd level set up:
$ xmodmap -pke | grep 32
keycode 32 = o O odiaeresis Odiaeresis
Same thing happens when I try to use AltGr + (a|u|s).
Xmodmap works for other remappings
Since my PgUp key on my laptop is small, I have remapped the num pad + to by Page Up in my ~/.Xmodmap
, and that works fine. So my XModmap file is being (partially) read.
Why does my reassigments to o/a/u not work?
I am using Ubuntu 14.0.1 trusty with Ubuntu Unity.