You can not configure it, because Alt is not a key code modifier in standard X servers. In X11 keys can be defined and changed with xmodmap
. The program xev
can be used to identify the key code. Start xev
and press 2
. On a German PC keyboard it looks this way:
KeyPress event, serial 33, synthetic NO, window 0x3000001,
root 0x69, subw 0x0, time 3044226, (160,148), root:(164,198),
state 0x0, keycode 11 (keysym 0x32, 2), same_screen YES,
XLookupString gives 1 bytes: (32) "2"
XmbLookupString gives 1 bytes: (32) "2"
XFilterEvent returns: True
KeyRelease event, serial 33, synthetic NO, window 0x3000001,
root 0x69, subw 0x0, time 3044305, (160,148), root:(164,198),
state 0x0, keycode 11 (keysym 0x32, 2), same_screen YES,
XLookupString gives 1 bytes: (32) "2"
XFilterEvent returns: False
You can see that the key code for the key is 11. Now you can display the key code definition with xmodmap
:
$ xmodmap -pke|grep ' 11 ='
keycode 11 = 2 quotedbl twosuperior oneeighth twosuperior oneeighth
You can see four different keys the key code 11 can generate. The man page for xmodmap explains which key gets generated by which modifier:
keycode NUMBER = KEYSYMNAME ...
The list of keysyms is assigned to the indicated keycode (which
may be specified in decimal, hex or octal and can be determined
by running the xev program). Up to eight keysyms may be
attached to a key, however the last four are not used in any
major X server implementation. The first keysym is used when
no modifier key is pressed in conjunction with this key, the
second with Shift, the third when the Mode_switch key is used
with this key and the fourth when both the Mode_switch and
Shift keys are used.
Only Shift
and Mode_switch
are valid modifiers for X11 key codes. If you want your Alt
key to be a valid modifier you have to patch your X server. Theoretically it is possible, because there are 8 modifiers possible. But your X server must know that.