Voici comment j'ai essayé de basculer le mappage de la ENTERclé sur la SHIFTclé (et inversement):
$ uname -a
RAPPORTS:
Linux box 2.6.32-37-generic #81-Ubuntu SMP Fri Dec 2 20:35:14 UTC 2011 i686 GNU/Linux
$ which xmodmap
RAPPORTS:
/usr/bin/xmodmap
$ which xev
RAPPORTS:
/usr/bin/xev
$ xev
(ignorez les cinquante prochaines lignes environ)
PRESS THE ENTER KEY (notice the third line):
KeyPress event, serial 33, synthetic NO, window 0x5600001,
root 0x110, subw 0x0, time 263441120, (738,242), root:(771,314),
state 0x0, keycode 36 (keysym 0xff0d, Return), same_screen YES,
XLookupString gives 1 bytes: (0d)
XmbLookupString gives 1 bytes: (0d)
XFilterEvent returns: False
KeyRelease event, serial 33, synthetic NO, window 0x5600001,
root 0x110, subw 0x0, time 263441271, (738,242), root:(771,314),
state 0x0, keycode 36 (keysym 0xff0d, Return), same_screen YES,
XLookupString gives 1 bytes: (0d)
XFilterEvent returns: False
PRESS THE SHIFT KEY (notice the third line):
KeyPress event, serial 30, synthetic NO, window 0x5600001,
root 0x110, subw 0x0, time 263592202, (464,368), root:(497,440),
state 0x0, keycode 62 (keysym 0xffe2, Shift_R), same_screen YES,
XLookupString gives 0 bytes:
XmbLookupString gives 0 bytes:
XFilterEvent returns: False
KeyRelease event, serial 33, synthetic NO, window 0x5600001,
root 0x110, subw 0x0, time 263592298, (464,368), root:(497,440),
state 0x1, keycode 62 (keysym 0xffe2, Shift_R), same_screen YES,
XLookupString gives 0 bytes:
XFilterEvent returns: False
L’important est la troisième ligne de chaque pression de touche:
FOR:
state 0x0, keycode 36 (keysym 0xff0d, Return), same_screen YES,
The name "Return" is the name of the behavior of the key pressed.
The number of the key pressed is "36".
state 0x0, keycode 62 (keysym 0xffe2, Shift_R), same_screen YES,
The name "Shift_R" is the name of the behavior of the key pressed.
The number of the key pressed is "62".
INVERSEZ LA CARTOGRAPHIE:
$ xmodmap -e "keycode 62 = Return"
$ xmodmap -e "keycode 36 = Shift_R"
CONSERVER LES RÉSULTATS:
$ xmodmap -pke > ~/.Xmodmap
$ vi ~/.xinitrc
AJOUTER
xmodmap ~/.Xmodmap
$ sudo reboot
Le problème principal était que l'inversion ne fonctionnait pas. La ENTERclé a été associée à la SHIFT_Rclé; mais la SHIFT_Rclé n'a pas été mappée à la ENTERclé. Allez comprendre.