shell 使用dconf将hat / caret /circuflex(制表符上方)键指定为键绑定

6fe3ivhb  于 2023-02-19  发布在  Shell
关注(0)|答案(1)|浏览(130)

我尝试使用dconf(在Mint 21.1 Cinnamon上)通过命令行添加一个自定义键绑定,我成功地做到了这一点,例如,对于ctrl + s键,使用以下代码行:

dconf write /org/cinnamon/desktop/keybindings/custom-list "['custom0']"     
dconf write /org/cinnamon/desktop/keybindings/custom-keybindings/custom0/command "'tilix --quake'"
dconf write /org/cinnamon/desktop/keybindings/custom-keybindings/custom0/name "'tilixquake'"
dconf write /org/cinnamon/desktop/keybindings/custom-keybindings/custom0/binding "['<Control>s']"

然而,我想指定“帽子”/“脱字符”/“抑扬符”键ctrl + ^作为快捷方式,但无法使其工作。

在最后一行中,我尝试了不同的绑定字符串,但是没有一个有效:

"['<Control>^']"

"['<Control>Hat']"

"['<Control><Hat>']"

"['<Control>Caret']"

"['<Control><Caret>']"

"['<Control>Circumflex']"

"['<Control><Circumflex>']"

我如何正确地处理^键,使它与dconf一起工作?是否有可能的键标识符列表?我找不到一个...

ssgvzors

ssgvzors1#

好吧,在进一步调查之后,我找到了答案。
我想知道是否一些预先存在的键绑定已经使用了^键,并打印了所有使用

gsettings list-recursively | fgrep org.cinnamon.desktop.keybindings

在输出中,我发现了一条线
org.肉桂.桌面.键绑定.wm开关组['Above_Tab']
直到我发现了这个,我才意识到^键在不同的键盘布局中是在不同的位置。在我的德语QWERTY布局中,它是在Tab上面的一个。在QWERTY布局中,同一个键将是一个反勾。
无论哪种方式,使用Above_Tab作为^的标识符,我都可以成功地设置键绑定:

dconf write /org/cinnamon/desktop/keybindings/custom-list "['custom0']"     
dconf write /org/cinnamon/desktop/keybindings/custom-keybindings/custom0/command "'tilix --quake'"
dconf write /org/cinnamon/desktop/keybindings/custom-keybindings/custom0/name "'tilixquake'"
dconf write /org/cinnamon/desktop/keybindings/custom-keybindings/custom0/binding "['<Control>Above_Tab'

相关问题