Sign up ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems. It's 100% free, no registration required.

Playing with xmodmap I encountered a modifier key I hadn't heard of: Mode_switch. It seems to have something to do with inserting special characters.

I assigned it to a key but it seems to have no effect. What is it for? Is it different from ISO_Level3_Shift (Alt Gr)?

share|improve this question

1 Answer 1

up vote 13 down vote accepted

Mode_switch is the old-style (pre-XKB) name of the key that is called AltGr on many keyboard layouts. It is similar to Shift, in that when you press a key that corresponds to a character, you get a different character if Shift or AltGr is also pressed. Unlike Shift, Mod_switch is not a modifier in the X11 sense because it normally applies to characters, not to function keys, so applications only need to perform a character lookup to obtain the desired effect.

ISO_Level3_Shift is the XKB version of this key. Generally speaking, XKB is a lot more complicated and can do some extra fancy stuff. XKB's mechanism is more general as it allows keyboard layouts to vary in which keys are influenced by which modifiers, it generalizes sticky (CapsLock-style) and simultaneous-press (Shift-style) modifiers and so on.

share|improve this answer
Great to know that ISO_Level3_Shift can act 'stickily', I was looking for that functionality for a long while:… – vemv Nov 7 '12 at 23:06
@Gilles So, are AltGr and Mode_switch the same keys? If not, in this link, they sound as if they are the same things. Could you clarify this a bit? – Utku Oct 18 at 18:13
@Utku Mode_switch and ISO_Level3_Shift do the same thing in slightly different ways. I don't claim to understand the differences; most of the time they don't matter but I do remember that mixing xmodmap with XKB names occasionally caused modifiers not to work right. – Gilles Oct 18 at 19:23

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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