Ecco come ho provato a cambiare la mappatura della ENTERchiave sulla SHIFTchiave (e viceversa):
$ uname -a
RAPPORTI:
Linux box 2.6.32-37-generic #81-Ubuntu SMP Fri Dec 2 20:35:14 UTC 2011 i686 GNU/Linux
$ which xmodmap
RAPPORTI:
/usr/bin/xmodmap
$ which xev
RAPPORTI:
/usr/bin/xev
$ xev
(ignora le prossime cinquanta righe o giù di lì)
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'importante è la terza riga di ciascun tasto:
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".
INVERTI IL MAPPATURA:
$ xmodmap -e "keycode 62 = Return"
$ xmodmap -e "keycode 36 = Shift_R"
SALVA I RISULTATI:
$ xmodmap -pke > ~/.Xmodmap
$ vi ~/.xinitrc
INSERISCI
xmodmap ~/.Xmodmap
$ sudo reboot
Il problema principale era che l'inversione NON funzionava. La ENTERchiave è stata mappata sulla SHIFT_Rchiave; ma la SHIFT_Rchiave non è stato mappato alla ENTERchiave. Vai a capire.