Mode_shift
in Xkb is a shift key for groups or layouts. If you have a
layout with multiple groups, you can hold down this key to access the
next group. If you have several layouts, you can hold down this key to
shift between layouts (†1).
So Mode_shift
is to groups what Shift (or Shift_L
and
Shift_R
, to use the keysym names) is to levels.
This might become more clear if we consider that Mode_shift
has an
alias called ISO_Group_Shift
(†2). There are also keys called
ISO_Group_Latch
and ISO_Group_Lock
which correspond to
ISO_Level2_Latch
(latch shift) and Shift_Lock
, respectively (†3).
There are also a number of aliases for different scripts:
kana_switch
Arabic_switch
Greek_switch
Hebrew_switch
Hangul_switch
†1: This is based on my understanding of Xkb’s “groups” and “layouts”.
It seems that they are treated the same as far as selecting between them
with keys like this.
†2: I am basing this on the file keysymdef.h
in this Git repository
at revision ab8666661fc6 (“Add XF86XK_AudioPreset”, 2017-05-10). On
installations you will probably find this file at
/usr/include/X11/keysymdef.h
.
†3: There is also a key ISO_Lock
, a kind of general-purpose lock key.
The meaning of the AltGr
key
Gilles mentioned in his answer the connection with the
AltGr key:
Mode_switch
is the old-style (pre-XKB) name of the key that is
called AltGr on many keyboard layouts.
That lead me to suspect that “AltGr” might stand for
“alternate/alternative group”, since Mode_switch
is used to shift
groups. This turned out to be wrong, however. According to the
Wikipedia page on the AltGr key, “AltGr” seems to come from
IBM keyboards, and in their manuals it says that it is an abbreviation
for “alternate graphics”. This makes sense, since it seems likely that
using the keyboard to draw “graphics” (box-drawing characters used in
text user interfaces) came well before there was good support for
switching quickly between multiple scripts.