Aqui está como eu tentei mudar o mapeamento da ENTERchave para a SHIFTchave (e vice-versa):
$ uname -a
RELATÓRIOS:
Linux box 2.6.32-37-generic #81-Ubuntu SMP Fri Dec 2 20:35:14 UTC 2011 i686 GNU/Linux
$ which xmodmap
RELATÓRIOS:
/usr/bin/xmodmap
$ which xev
RELATÓRIOS:
/usr/bin/xev
$ xev
(ignore as próximas cinquenta linhas)
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
O importante é a terceira linha de cada pressionamento de tecla:
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".
REVERSE O MAPEAMENTO:
$ xmodmap -e "keycode 62 = Return"
$ xmodmap -e "keycode 36 = Shift_R"
SALVAR OS RESULTADOS:
$ xmodmap -pke > ~/.Xmodmap
$ vi ~/.xinitrc
ADICIONAR, ACRESCENTAR
xmodmap ~/.Xmodmap
$ sudo reboot
O principal problema foi que a reversão NÃO funcionou. A ENTERchave foi mapeada para a SHIFT_Rchave; mas a SHIFT_Rchave não foi mapeada para a ENTERchave. Vai saber.