【发布时间】:2019-05-05 15:36:23
【问题描述】:
我在空格键旁边有一个带有神秘 LNG 键的键盘,AltGr 通常位于该位置。有没有办法让AltGr(Alt)脱离出来?
这是xev LNG 键被按下和释放一次的控制台输出:
KeyPress event, serial 40, synthetic NO, window 0x5400001,
root 0xf5, subw 0x0, time 56044552, (-281,525), root:(827,552),
state 0x0, keycode 105 (keysym 0xffe4, Control_R), same_screen YES,
XLookupString gives 0 bytes:
XmbLookupString gives 0 bytes:
XFilterEvent returns: False
KeyPress event, serial 40, synthetic NO, window 0x5400001,
root 0xf5, subw 0x0, time 56044568, (-281,525), root:(827,552),
state 0x4, keycode 62 (keysym 0xffe2, Shift_R), same_screen YES,
XLookupString gives 0 bytes:
XmbLookupString gives 0 bytes:
XFilterEvent returns: False
KeyRelease event, serial 40, synthetic NO, window 0x5400001,
root 0xf5, subw 0x0, time 56044587, (-281,525), root:(827,552),
state 0x5, keycode 105 (keysym 0xffe4, Control_R), same_screen YES,
XLookupString gives 0 bytes:
XFilterEvent returns: False
KeyRelease event, serial 40, synthetic NO, window 0x5400001,
root 0xf5, subw 0x0, time 56044587, (-281,525), root:(827,552),
state 0x1, keycode 62 (keysym 0xffe2, Shift_R), same_screen YES,
XLookupString gives 0 bytes:
XFilterEvent returns: False
有没有办法使用这些信息?
更新:
很遗憾,这是不可能的,因为 LNG 钥匙会同时触发两个钥匙代码。
将Menu 重新映射为Alt R:
更改为 /usr/share/X11/xkb/symbols/pc:
key <MENU> { [ Menu ] };
到
key <MENU> { [ Alt_R ] };
从 /var/lib/xkb/ 中删除预编译的 *.xkm 文件(如果有)
【问题讨论】:
标签: linux keyboard key mapping