在 Linux 上将右侧 Alt 键 + 键绑定到另一个键

在 Linux 上将右侧 Alt 键 + 键绑定到另一个键

我使用一个名为“keyremaplinux”的键重新映射器(来源:https://github.com/kozikow/keyremaplinux)。它运行良好,但便携性不强,需要很大的配置。我希望能够轻松地将软件带到工作中,并安装到其他 Linux(主要是 CentOS)机器上。该解决方案应该适用于所有系统,而不是特定于某个程序。

我想要的是

right-alt+ 键another key将输入不同的键。例如,我的整个数字行都映射到 qwerty 行,如下所示:

right-alt + q = 1
right-alt + w = 2
right-alt + e = 3
right-alt + r = 4
right-alt + t = 5
right-alt + y = 6
right-alt + u = 7

right-alt + shift + q = !
right-alt + shift + w = @
right-alt + shift + e = #
right-alt + shift + r = $
right-alt + shift + t = %
right-alt + shift + y = ^
right-alt + shift + u = &

和杂项绑定,例如

right-alt + a = (
right-alt + s = )
right-alt + d = {
right-alt + f = }

我尝试过的

xbindkeys- 这个工具看起来无法区分left-alt钥匙和right-alt钥匙。当我使用xbindkeys -k并按 时right-alt key + 1,它返回“m:0x18 + c:10 | Alt+Mod2 + 1”,这与我按相同left-alt key + 1

sxhkd- 根据此 GitHub 帖子,您无法left/right alt单独触发密钥。https://github.com/baskerville/sxhkd/issues/89。虽然根据这个其他论坛,您可以映射到left/right alt(只是不是来自)https://bbs.archlinux.org/viewtopic.php?id=155613&p=3。只是重申一下 - 我不使用 Arch。我用的是CentOS。该论坛恰好来自Arch。

相关内容