저는 macOS Catalina의 Oracle VirtualBox 6.1에서 실행되는 Debian 10에서 Xfce 4.12를 사용하고 있습니다.
내 모든 키맵은 macOS에서 기본값으로 설정되어 있습니다. (시스템 환경설정 > 키보드 > 수정자 키 > 기본값 복원 > 확인.)
탈출 캡이 잘 작동합니다
Debian VM에서는 다음을 실행합니다.
$ setxkbmap -option
$ setxkbmap -query
rules: evdev
model: pc105
layout: us
$ setxkbmap -option caps:escape
$ setxkbmap -query
rules: evdev
model: pc105
layout: us
options: caps:escape
이제 Caps Lock은 Debian VM에서 이스케이프처럼 작동하고, Caps Lock은 macOS 시스템에서 Caps Lock처럼 작동합니다. 이것은 예상대로 작동합니다.
xev
Caps Lock 키를 누른 후의 출력 은 다음과 같습니다 setxkbmap -option
.
KeyPress event, serial 37, synthetic NO, window 0x3c00001,
root 0x3ac, subw 0x0, time 128721870, (-31,207), root:(560,530),
state 0x0, keycode 66 (keysym 0xffe5, Caps_Lock), same_screen YES,
XLookupString gives 0 bytes:
XmbLookupString gives 0 bytes:
XFilterEvent returns: False
KeyRelease event, serial 37, synthetic NO, window 0x3c00001,
root 0x3ac, subw 0x0, time 128721874, (-31,207), root:(560,530),
state 0x2, keycode 66 (keysym 0xffe5, Caps_Lock), same_screen YES,
XLookupString gives 0 bytes:
XFilterEvent returns: False
xev
Caps Lock 키를 누른 후의 출력 은 다음과 같습니다 setxkbmap -option caps:escape
.
KeyPress event, serial 37, synthetic NO, window 0x3c00001,
root 0x3ac, subw 0x0, time 128844487, (163,5), root:(754,328),
state 0x0, keycode 66 (keysym 0xff1b, Escape), same_screen YES,
XKeysymToKeycode returns keycode: 9
XLookupString gives 1 bytes: (1b) "
mbLookupString gives 1 bytes: (1b) "
FilterEvent returns: False
KeyRelease event, serial 37, synthetic NO, window 0x3c00001,
root 0x3ac, subw 0x0, time 128844489, (163,5), root:(754,328),
state 0x0, keycode 66 (keysym 0xff1b, Escape), same_screen YES,
XKeysymToKeycode returns keycode: 9
XLookupString gives 1 bytes: (1b) "
FilterEvent returns: False
제어 상한이 작동하지 않음
Debian VM에서는 다음을 실행합니다.
$ setxkbmap -option
$ setxkbmap -query
rules: evdev
model: pc105
layout: us
$ setxkbmap -option ctrl:nocaps
$ setxkbmap -query
rules: evdev
model: pc105
layout: us
options: ctrl:nocaps
이제 Caps Lock은 Debian VM의 Ctrl 수정자와 다르게 동작합니다.
xev
Caps Lock 키를 누른 후의 출력 은 다음과 같습니다 setxkbmap -option
.
KeyPress event, serial 37, synthetic NO, window 0x3c00001,
root 0x3ac, subw 0x0, time 129089370, (163,1), root:(754,324),
state 0x0, keycode 66 (keysym 0xffe5, Caps_Lock), same_screen YES,
XLookupString gives 0 bytes:
XmbLookupString gives 0 bytes:
XFilterEvent returns: False
KeyRelease event, serial 37, synthetic NO, window 0x3c00001,
root 0x3ac, subw 0x0, time 129089373, (163,1), root:(754,324),
state 0x2, keycode 66 (keysym 0xffe5, Caps_Lock), same_screen YES,
XLookupString gives 0 bytes:
XFilterEvent returns: False
xev
Caps Lock 키를 누른 후의 출력 은 다음과 같습니다 setxkbmap -option ctrl:nocaps
.
KeyPress event, serial 37, synthetic NO, window 0x3c00001,
root 0x3ac, subw 0x0, time 129117033, (163,5), root:(754,328),
state 0x2, keycode 66 (keysym 0xffe3, Control_L), same_screen YES,
XKeysymToKeycode returns keycode: 37
XLookupString gives 0 bytes:
XmbLookupString gives 0 bytes:
XFilterEvent returns: False
KeyRelease event, serial 37, synthetic NO, window 0x3c00001,
root 0x3ac, subw 0x0, time 129117037, (163,5), root:(754,328),
state 0x6, keycode 66 (keysym 0xffe3, Control_L), same_screen YES,
XKeysymToKeycode returns keycode: 37
XLookupString gives 0 bytes:
XFilterEvent returns: False
무엇이 잘못되었나요?
이 문제에 대한 추가 xev 출력.
아래 주석 섹션을 따라가면 지금까지 setxkbmap -option ctrl:nocaps
+를 실행 하여 letter 를 입력한 후 +가 올바르게 작동한다는 것을 알 수 있습니다 (예: bash에서 현재 명령을 취소함).caps lockcc
ctrlc
ctrl이것은 +의 xev 출력입니다 c.
KeyPress event, serial 37, synthetic NO, window 0x3c00001,
root 0x3ac, subw 0x0, time 176921083, (165,3), root:(756,326),
state 0x0, keycode 37 (keysym 0xffe3, Control_L), same_screen YES,
XLookupString gives 0 bytes:
XmbLookupString gives 0 bytes:
XFilterEvent returns: False
KeyPress event, serial 37, synthetic NO, window 0x3c00001,
root 0x3ac, subw 0x0, time 176921220, (165,3), root:(756,326),
state 0x4, keycode 54 (keysym 0x63, c), same_screen YES,
XLookupString gives 1 bytes: (03) ""
XmbLookupString gives 1 bytes: (03) ""
XFilterEvent returns: False
KeyRelease event, serial 37, synthetic NO, window 0x3c00001,
root 0x3ac, subw 0x0, time 176921334, (165,3), root:(756,326),
state 0x4, keycode 54 (keysym 0x63, c), same_screen YES,
XLookupString gives 1 bytes: (03) ""
XFilterEvent returns: False
KeyRelease event, serial 37, synthetic NO, window 0x3c00001,
root 0x3ac, subw 0x0, time 176921336, (165,3), root:(756,326),
state 0x4, keycode 37 (keysym 0xffe3, Control_L), same_screen YES,
XLookupString gives 0 bytes:
XFilterEvent returns: False
caps lock
이는 +의 출력입니다 c
.
KeyPress event, serial 37, synthetic NO, window 0x3c00001,
root 0x3ac, subw 0x0, time 176819139, (165,5), root:(756,328),
state 0x0, keycode 66 (keysym 0xffe3, Control_L), same_screen YES,
XKeysymToKeycode returns keycode: 37
XLookupString gives 0 bytes:
XmbLookupString gives 0 bytes:
XFilterEvent returns: False
KeyRelease event, serial 37, synthetic NO, window 0x3c00001,
root 0x3ac, subw 0x0, time 176819141, (165,5), root:(756,328),
state 0x4, keycode 66 (keysym 0xffe3, Control_L), same_screen YES,
XKeysymToKeycode returns keycode: 37
XLookupString gives 0 bytes:
XFilterEvent returns: False
KeyPress event, serial 37, synthetic NO, window 0x3c00001,
root 0x3ac, subw 0x0, time 176819251, (165,5), root:(756,328),
state 0x0, keycode 54 (keysym 0x63, c), same_screen YES,
XLookupString gives 1 bytes: (63) "c"
XmbLookupString gives 1 bytes: (63) "c"
XFilterEvent returns: False
KeyRelease event, serial 37, synthetic NO, window 0x3c00001,
root 0x3ac, subw 0x0, time 176819371, (165,5), root:(756,328),
state 0x0, keycode 54 (keysym 0x63, c), same_screen YES,
XLookupString gives 1 bytes: (63) "c"
XFilterEvent returns: False
ctrl여기서 문제는 원시적 이며 c올바른 순서로 올바른 키 이벤트를 보내는 것 같습니다 .
- ctrl~에 따르면
- c~에 따르면
- c풀어 주다
- ctrl풀어 주다)
그러나 caps lock+ c조합은 주요 이벤트를 잘못된 순서로 보냅니다.
- ctrl~에 따르면
- ctrl풀어 주다
- c~에 따르면
- c풀어 주다
이 문제를 어떻게 해결할 수 있나요?