새 ThinkPad를 구입했는데 키가 없습니다. 그런데 원래 있어야 할 곳에 키가 ContextMenu있습니다 . 나는 그것을 다시 매핑하는 데 사용했습니다 .PrintScreenContextMenuxmodmap
KeyPress
문제는 이벤트가 누락되고 이벤트만 존재한다는 것이 핵심입니다 KeyRelease
. 키코드가 107인 것을 발견하고 실행했습니다.
xmodmap -e "keycode 107 = Menu NoSymbol Menu"
ContextMenu...음... 을 누르면 PrintScreen다음과 같은 결과가 나옵니다 xev
.
KeymapNotify event, serial 40, synthetic NO, window 0x0,
keys: 0 0 0 0 0 0 0 0 0 0 0 0 0 8 0 0
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
KeyRelease event, serial 40, synthetic NO, window 0x4c00001,
root 0xb8, subw 0x0, time 19723366, (753,710), root:(761,752),
state 0x10, keycode 107 (keysym 0xff67, Menu), same_screen YES,
XLookupString gives 0 bytes:
XFilterEvent returns: False
보시다시피 "메뉴" KeyPress
가 누락되어 KeyRelease
고독하게 올바르게 표시됩니다. 완전히 깨지지는 않았습니다. Super+를 누르면 마술처럼 나타 PrintScreen납니다 KeyPress
.
KeyPress event, serial 40, synthetic NO, window 0x4c00001,
root 0xb8, subw 0x0, time 19800199, (462,314), root:(470,356),
state 0x10, keycode 133 (keysym 0xffeb, Super_L), same_screen YES,
XLookupString gives 0 bytes:
XmbLookupString gives 0 bytes:
XFilterEvent returns: False
KeyPress event, serial 40, synthetic NO, window 0x4c00001,
root 0xb8, subw 0x0, time 19800349, (462,314), root:(470,356),
state 0x50, keycode 107 (keysym 0xff67, Menu), same_screen YES,
XLookupString gives 0 bytes:
XmbLookupString gives 0 bytes:
XFilterEvent returns: False
KeyRelease event, serial 40, synthetic NO, window 0x4c00001,
root 0xb8, subw 0x0, time 19800408, (462,314), root:(470,356),
state 0x50, keycode 107 (keysym 0xff67, Menu), same_screen YES,
XLookupString gives 0 bytes:
XFilterEvent returns: False
KeyRelease event, serial 40, synthetic NO, window 0x4c00001,
root 0xb8, subw 0x0, time 19800541, (462,314), root:(470,356),
state 0x50, keycode 133 (keysym 0xffeb, Super_L), same_screen YES,
XLookupString gives 0 bytes:
XFilterEvent returns: False
지금은 작동하지만 아직 완벽하지는 않습니다.
내꺼 본 사람 있어 KeyPress
? 어디로 갔나요?