将组合键重新映射到另一个组合,例如Super + Ctrl + Shift + J – > Ctrl + Shift + Left

我想实现一个附加键层,这样我就可以访问非字母数字键而无需移动我的手腕。

我一直在使用Autokey这个目的,但经验并不令人满意:它偶尔有滞后,让原始击键滑入某些应用程序。

所以我需要一个低级别的解决方案。

尝试一下xbindkeys和xvkbd的组合。 xbindkeys侦听密钥并将转换发送到xvkbd。

sudo apt-get install xbindkeys xvkbd xbindkeys --defaults > /home/your-user-name/.xbindkeysrc 

在您喜欢的编辑器中打开.xbindkeysrc。 我评论了其他所有内容,但如果需要,可以参考。

为了检查它,我尝试映射Ctrl +; 按Ctrl + V.

 "xvkbd -xsendevent -text "\Cv"" control + semicolon 

我希望你能做到这样的事情

 "xvkbd -xsendevent -text "\C\S\[Left]"" Super+Control+Shift+J 

保存文件,然后运行xbindkeys

为了重新加载任何配置更改,我杀死了xbindkeys进程然后重新启动。

xbindkeys语法

我通过使用xbindkeys的GUI来制定组合键

 sudo apt-get install xbindkeys-config xbindkeys-config 

运行后,按Get Key键将组合放入.xbindkeysrc文件的第二行。

xvkbd语法

从手册:

 \r - Return \t - Tab \b - Backspace \e - Escape \d - Delete \S - Shift (modify the next character; please note that modify with ``\S'' will be ignored in many cases. For example, ``a\Cb\ScD\CE'' will be interpreted as a, Control-b, c, Shift-D, and Control-Shift-E.) \C - Control (modify the next character) \A - Alt (modify the next character) \M - Meta (modify the next character) \[keysym] - the keysym keysym (eg, \[Left]), which will be processed in the similar matter with other general characters \{keysym} - the keysym keysym (eg, \{Left}), which will be processed in more primitive matter and can also be used for modofier keys such as Control_L, Meta_L, etc.; also, \{+keysym} and \{+keysym} will simulate press and release of the key, respectively [Version 3.3] \Ddigit - delay digit * 100 ms \xvalue - move mouse pointer (use "+" or "-" for relative motion) \yvalue - move mouse pointer (use "+" or "-" for relative motion) \mdigit - simulate click of the specified mouse button 

很想知道它是如何工作的,以及这种组合是否适合您的目的。 它作为键映射器看起来不错,但不一定是宏运行器。

我想你可以在这里找到解决方案(因为Xorg是最低级别的层…): https : //wiki.archlinux.org/index.php/Keyboard_configuration_in_Xorg

编辑:据我lv3:win_switch ,您需要在.conf文件中添加选项lv3:win_switch