ENTER키 매핑을 키로 전환하는 방법은 다음과 같습니다 SHIFT.
$ uname -a
보고서 :
Linux box 2.6.32-37-generic #81-Ubuntu SMP Fri Dec 2 20:35:14 UTC 2011 i686 GNU/Linux
$ which xmodmap
보고서 :
/usr/bin/xmodmap
$ which xev
보고서 :
/usr/bin/xev
$ xev
(다음 50 줄 정도는 무시하십시오)
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
중요한 것은 각 키 누르기의 세 번째 줄입니다.
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".
매핑 반전 :
$ xmodmap -e "keycode 62 = Return"
$ xmodmap -e "keycode 36 = Shift_R"
결과를 저장하십시오.
$ xmodmap -pke > ~/.Xmodmap
$ vi ~/.xinitrc
더하다
xmodmap ~/.Xmodmap
$ sudo reboot
주요 문제는 반전이 작동하지 않았다는 것입니다. ENTER키는 매핑 된 SHIFT_R키; 그러나 SHIFT_R키가 키에 매핑되지 않았습니다 ENTER. 그림을 이동.