7

I use a us-intl with "AltGr dead keys" layout and the option to switch Alt and Win key. Nice, but my AltGr does not work. The key I want to use for AltGr has keycode 134 (found out using xev). So I create a .Xmodmap file:

keycode 134 = ISO_Level3_Shift Multi_key ISO_Level3_Shift Multi_key

than I execute "xmodmap .Xmodmap". When I now show my modifier, I get:

> xmodmap
xmodmap:  up to 4 keys per modifier, (keycodes in parentheses):

shift       Shift_L (0x32),  Shift_R (0x3e)
lock      
control     Control_L (0x25),  Control_R (0x69)
mod1        Alt_L (0x85),  Meta_L (0xcd)
mod2        Num_Lock (0x4d)
mod3      
mod4        Super_L (0x40),  Super_R (0x6c),  Super_L (0xce),  Hyper_L (0xcf)
mod5        ISO_Level3_Shift (0x5c),  ISO_Level3_Shift (0x86),  Mode_switch (0xcb)

But ... pressing AltGr (the key with code 134=0x86) + q does not give the expected result - which would be "a-umlaut". It should! xmodmap -pke contains this line:

keycode  24 = q Q q Q adiaeresis Adiaeresis adiaeresi

So what is wrong and what can I do?

4

According to the Xmodmap Manual, when you want to swap or change modifier keys you need to remove & clear their ties to their original keycodes and modifier groups. Then after assigning them to a new keycode you must also assign them to a new, unique group.

It looks like (this seem to be fairly common due to manufacturer configs) modifier group 5 has been assigned two different modifiers [Level3_shift] & [Mode_switch]! In effect, pressing one of them, activates/sends them both to the system. Each of them is designed to provide access to a unique layer/level of the keyboard, as well as an additional unique layer/level when pressed together. [Mode_switch] is apparently synonymous with [AltGr] providing access to layer 2- the second set of [q] & [Q] in your example, [ISO_Level3_shift] provides access to level three- the [ä] & [Ä] in your example- but you can't type either of those keys without typing both until you change your .xmodmap file. And your second "adiaeresi" (sic.) is missing the final [s] so it wouldn't produce any character.

I know this rather confusing and convoluted for no apparent reason, plus this thread is old. But hopefully someone will find my explanation useful at some point!

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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