![使用 xbindkeys 绑定箭头键时出现问题](https://linux22.com/image/1013595/%E4%BD%BF%E7%94%A8%20xbindkeys%20%E7%BB%91%E5%AE%9A%E7%AE%AD%E5%A4%B4%E9%94%AE%E6%97%B6%E5%87%BA%E7%8E%B0%E9%97%AE%E9%A2%98.png)
我正在尝试将 ctrl+win+p 绑定为“向上”箭头键。我将使用 xbindkeys,因此首先我开始xbindkeys -k
查看此组合的代码。它给了我这样的输出:
set@set001:~$ xbindkeys -k
Press combination of keys or/and click under the window.
You can use one of the two lines after "NoCommand"
in $HOME/.xbindkeysrc to bind a key.
"(Scheme function)"
m:0x54 + c:33
Control+Mod2+Mod4 + p
然后我在~/.xbindkeysrc
"xte 'key Up'"
Control+Mod2+Mod4 + p
但当我重新启动 xbindkeyskillall -s1 xbindkeys ; xbindkeys
并输入 ctrl+win+p时什么也没有发生
所有其他绑定都~/.xbindkeysrc
工作正常
我究竟做错了什么?
答案1
最后我能够重新绑定我想要的一切甚至更多。
将其放入~/.config/xkb/my
:
xkb_keymap {
xkb_keycodes { include "evdev+aliases(qwerty)" };
xkb_types { include "complete" };
xkb_compat { include "complete" };
xkb_geometry { include "pc(pc105)" };
xkb_symbols "my" {
include "pc+us+ru:2+inet(evdev)"
include "capslock(swapescape)"
include "group(alt_shift_toggle)"
key <TLDE> { [ grave, asciitilde ] };
key <LALT> { [ISO_Level3_Shift ] };
modifier_map Mod5 { ISO_Level3_Shift };
key <AD09> { [o, O, Up, Up] };
key <AC09> { [l, L, Down, Down] };
key <AC08> { [k, K, Left, Left] };
key <AC10> { [colon, semicolon, Right, Right] };
key <AC10> { [colon, semicolon, Right, Right] };
key <SPCE> { [space, BackSpace, BackSpace] };
key <BKSP> { [BackSpace, BackSpace] };
key <AD08> { [i, I, Delete] };
key <AB07> { [m, M, Prior] };
key <AB08> { [ comma, less, Next] };
};
};
然后重新启动xkbcomp ~/.config/xkb/my $DISPLAY