
포함하지 않도록 Mod1via 의 정의를 변경했습니다 (아래로 스크롤하는 이유를 이해하기 위해). 수정자의 현재 레이아웃은 다음과 같습니다. 의 정의에 참여하지 않음 에도 불구하고 에서 생성된 녹음에서는 Alt 키를 누르면 가 (8 in 으로 정의됨 )로 설정되는 것으로 표시 됩니다.xmodmap
ALT_RALT_Rmod1xev
KeyEvent.state
mod1Mask
/usr/include/X11/X.h
xmodmask
그렇지 ALT_R않다고 하면 mod1왜 + 인 것처럼 X
보고합니까 ?ALT_Rf
xmodmap: up to 4 keys per modifier, (keycodes in parentheses):
shift Shift_L (0x32), Shift_R (0x3e)
lock Caps_Lock (0x42)
control Control_L (0x25), Control_R (0x69)
mod1 Alt_L (0x40), Meta_L (0xcd)
mod2 Num_Lock (0x4d)
mod3
mod4 Super_L (0x85), Super_R (0x86), Super_L (0xce), Hyper_L (0xcf)
mod5 ISO_Level3_Shift (0x5c), Mode_switch (0xcb)
다음 순서는 ALT_L+ f다음 ALT_R+ 입니다 f.
KeyPress event, serial 32, synthetic NO, window 0x1000001,
root 0xc0, subw 0x0, time 4126632, (85,488), root:(86,489),
state 0x0, keycode 64 (keysym 0xffe9, Alt_L), same_screen YES,
XLookupString gives 0 bytes:
XmbLookupString gives 0 bytes:
XFilterEvent returns: False
KeyPress event, serial 32, synthetic NO, window 0x1000001,
root 0xc0, subw 0x0, time 4126850, (85,488), root:(86,489),
state 0x8, keycode 41 (keysym 0x66, f), same_screen YES,
XLookupString gives 1 bytes: (66) "f"
XmbLookupString gives 1 bytes: (66) "f"
XFilterEvent returns: False
KeyRelease event, serial 32, synthetic NO, window 0x1000001,
root 0xc0, subw 0x0, time 4126930, (85,488), root:(86,489),
state 0x8, keycode 64 (keysym 0xffe9, Alt_L), same_screen YES,
XLookupString gives 0 bytes:
XFilterEvent returns: False
KeyRelease event, serial 32, synthetic NO, window 0x1000001,
root 0xc0, subw 0x0, time 4126969, (85,488), root:(86,489),
state 0x0, keycode 41 (keysym 0x66, f), same_screen YES,
XLookupString gives 1 bytes: (66) "f"
XFilterEvent returns: False
KeyPress event, serial 32, synthetic NO, window 0x1000001,
root 0xc0, subw 0x0, time 4127907, (85,488), root:(86,489),
state 0x0, keycode 108 (keysym 0xffea, Alt_R), same_screen YES,
XLookupString gives 0 bytes:
XmbLookupString gives 0 bytes:
XFilterEvent returns: False
KeyPress event, serial 32, synthetic NO, window 0x1000001,
root 0xc0, subw 0x0, time 4128123, (85,488), root:(86,489),
state 0x8, keycode 41 (keysym 0x66, f), same_screen YES,
XLookupString gives 1 bytes: (66) "f"
XmbLookupString gives 1 bytes: (66) "f"
XFilterEvent returns: False
KeyRelease event, serial 32, synthetic NO, window 0x1000001,
root 0xc0, subw 0x0, time 4128164, (85,488), root:(86,489),
state 0x8, keycode 108 (keysym 0xffea, Alt_R), same_screen YES,
XLookupString gives 0 bytes:
XFilterEvent returns: False
KeyRelease event, serial 32, synthetic NO, window 0x1000001,
root 0xc0, subw 0x0, time 4128203, (85,488), root:(86,489),
state 0x0, keycode 41 (keysym 0x66, f), same_screen YES,
XLookupString gives 1 bytes: (66) "f"
XFilterEvent returns: False
배경:
ALT_R+를 사용하여 ENTER기능을 수행하는 응용 프로그램이 있습니다 . Xmonad에서 이 응용 프로그램을 사용할 때 Mod1+ 조합은 ENTER"현재 창을 마스터 창으로 교체" 기능을 트리거합니다. 기본적으로 ALT_L및 ALT_R에 매핑됩니다 Mod1.
내 에서는 Xmonad를 시작하기 전에 정의의 일부 가 아닌 .xinitrc
키 맵을 변경했습니다 . 그럼에도 불구하고 Xmonad는 +를 입력할 때 여전히 창 교환 동작을 수행합니다 . Xmonad는 더 이상 .xmodmap
ALT_RMod1ALT_RENTERMod1ALT_R
여기 나의.xinitrc
# Java's GUI can't handle some non-reparenting window managers like
# Xmonad without being told how to behave
export _JAVA_AWT_WM_NONREPARENTING=1
# The right Alt key is useful in IntelliJ, tell Xmonad to ignore it
xmodmap ~/.Xmodmap
# Start Xmonad
xmonad
xmodmap
다음은 Xmonad가 시작된 후의 출력입니다 .
시퀀스를 녹음했으며 xev
이 등록되지 않았음을 확인했습니다 ENTER. 대신, 녹화 후에 여러 FocusIn
/ 이벤트가 발생합니다.FocusOut
ALT_R
KeyPress event, serial 32, synthetic NO, window 0x1200001,
root 0xc0, subw 0x0, time 1432589, (92,374), root:(93,375),
state 0x0, keycode 108 (keysym 0xffea, Alt_R), same_screen YES,
XLookupString gives 0 bytes:
XmbLookupString gives 0 bytes:
XFilterEvent returns: False
FocusOut event, serial 32, synthetic NO, window 0x1200001,
mode NotifyGrab, detail NotifyAncestor
PropertyNotify event, serial 32, synthetic NO, window 0x1200001,
atom 0x155 (WM_STATE), time 1433760, state PropertyNewValue
FocusOut event, serial 32, synthetic NO, window 0x1200001,
mode NotifyUngrab, detail NotifyPointer
FocusIn event, serial 32, synthetic NO, window 0x1200001,
mode NotifyUngrab, detail NotifyAncestor
KeymapNotify event, serial 32, synthetic NO, window 0x0,
keys: 0 0 0 0 0 0 0 0 0 0 0 0 0 16 0 0
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
KeyRelease event, serial 32, synthetic NO, window 0x1200001,
root 0xc0, subw 0x0, time 1434117, (92,374), root:(93,375),
state 0x8, keycode 108 (keysym 0xffea, Alt_R), same_screen YES,
XLookupString gives 0 bytes:
XFilterEvent returns: False
답변1
Alt_R이 다른 수정자에 할당되지 않은 경우 기본값은 Mod1Mask인 것 같습니다.
단순히 Xmodmap에서 올바른 Alt를 바인딩 해제하는 것만으로는 상태 0x8 보고를 중지하는 데 충분하지 않았습니다. 이를 다른 수정자에 바인딩해야 했습니다(어쨌든 비어 있었기 때문에 Mod3를 선택했습니다). 그런 다음 xev는 상태 0x20을 보고하기 시작했습니다.
해결책이라기보다는 해결 방법에 가깝습니다.