我正在尝试将功能键组合映射到 XF86 键符号。组合键是Fn+ F1,我可以用它showkey
来获取原始键码。
jason@io ~ $ showkey
kb mode was RAW
[ if you are trying this under X, it might not work
since the X server is also reading /dev/console ]
press any key (program terminates 10s after last keypress)...
keycode 28 release
keycode 466 press
keycode 466 release
keycode 113 press
keycode 113 release
keycode 114 press
keycode 114 release
在键码中添加 8 showkey
,如另一篇文章中所述问题,给出的 X 键码为 474。尽管如此,运行xev
似乎并没有捕获按键的按下或释放。它确实捕获了接下来的两个功能键组合(Fn+ F2,Fn+ F3)。
jason@io ~ $ xev -root
FocusIn event, serial 18, synthetic NO, window 0x71,
mode NotifyGrab, detail NotifyInferior
KeymapNotify event, serial 18, synthetic NO, window 0x0,
keys: 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 2
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
FocusOut event, serial 18, synthetic NO, window 0x71,
mode NotifyUngrab, detail NotifyInferior
FocusIn event, serial 18, synthetic NO, window 0x71,
mode NotifyGrab, detail NotifyInferior
KeymapNotify event, serial 18, synthetic NO, window 0x0,
keys: 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 4
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
FocusOut event, serial 18, synthetic NO, window 0x71,
mode NotifyUngrab, detail NotifyInferior
我正在尝试处理窗口管理器中的组合键,其中有许多其他工作绑定,包括Fn+F2和Fn+ F3。然而,似乎 X 没有接收到按键,或者可能.Xmodmap
没有正确绑定键码。
我是不是做错了什么?还有其他方法吗?