-   Linux - Desktop (
-   -   xmodmap: Mapping ISO_Level3_Shift does not work (

huangho 01-15-2011 08:59 PM

xmodmap: Mapping ISO_Level3_Shift does not work

I'm trying to have both Mode_switch and ISO_Level3_Shift on the same keymap, but X is ignoring my ISO_Level3_Shift binding.

I want to have something like this in my xmodmap:


keysym c = c C ccedilla Ccedilla ccircumflex Ccircumflex
and have AltGr+c produce ccedilla and Insert+c produce ccircumflex. (Yes, Insert. It is in a strange place in this keyboard.) The original modifier map was:


vitor@pts5 vitor(0)$ cat /tmp/x
xmodmap:  up to 3 keys per modifier, (keycodes in parentheses):

shift      Shift_L (0x32),  Shift_R (0x3e)
lock        Caps_Lock (0x42)
control    Control_L (0x25),  Control_R (0x6d)
mod1        Alt_L (0x40),  Alt_R (0x71),  Meta_L (0x9c)
mod2        Num_Lock (0x4d)
mod4        Super_L (0x7f),  Hyper_L (0x80)
mod5        Mode_switch (0x5d),  ISO_Level3_Shift (0x7c)

AltGr sends keycode 113 and keysym Alt_R. Insert sends keycode 106 (and keysym Insert, of course.) Then I tried:


vitor@pts5 vitor(0)$ xmodmap -e 'keycode 113 = Mode_switch'
vitor@pts5 vitor(0)$ xmodmap -e 'keycode 106 = ISO_Level3_Shift'
vitor@pts5 vitor(0)$ xmodmap -e 'keysym c = c C x X y Y z Z'

Now AltGr+c produces x, but Insert+c produces c.

Then I tried:


vitor@pts7 vitor(1)$ xmodmap -e 'clear mod5'
vitor@pts7 vitor(0)$ xmodmap -e 'add mod5 = Mode_switch'

But the problem persists. Trying to assign ISO_Level3_Shift to the AltGr key doesn't work either.

Any idea about what is happening here? I'm using Xorg 7.3 on Debian 5.07. Thanks in advance!

huangho 01-15-2011 09:31 PM

Crude solution
I changed xorg.conf to use "us(intl)" instead of "us" as keymap and now it honors ISO_Level3_Shift. Does not make a lot of sense, but it works...

All times are GMT -5. The time now is 06:29 PM.