恕我直言,最好的选择是重新定义Calculator密钥的键绑定,就像@ user58635所说的那样。
为了使它更具编程性,例如,在新安装后要执行的脚本中包含这些步骤,这些步骤可能对多个应用程序有用:
将当前绑定设置为none:
gsettings set org.gnome.settings-daemon.plugins.media-keys calculator ''
为计算器键1创建一个新的自定义键绑定:
如果没有其他自定义按键绑定:
# Create a new set of custom keybindings
gsettings set org.gnome.settings-daemon.plugins.media-keys custom-keybindings "['/org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/custom0/']"
# Set the new custom keybinding (key, command, name)
gsettings set org.gnome.settings-daemon.plugins.media-keys.custom-keybinding:/org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/custom0/ binding 'Calculator'
gsettings set org.gnome.settings-daemon.plugins.media-keys.custom-keybinding:/org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/custom0/ command 'qalculate-gtk'
gsettings set org.gnome.settings-daemon.plugins.media-keys.custom-keybinding:/org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/custom0/ name 'Qalculate'
如果您已经有一些自定义的按键绑定正在运行,则必须将其添加为另一个。例如:
# Create a new set of custom keybindings
gsettings set org.gnome.settings-daemon.plugins.media-keys custom-keybindings "['/org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/custom0/', '/org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/custom1/']"
# Set the first custom keybinding (key, command, name)
gsettings set org.gnome.settings-daemon.plugins.media-keys.custom-keybinding:/org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/custom0/ binding 'Launch5'
gsettings set org.gnome.settings-daemon.plugins.media-keys.custom-keybinding:/org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/custom0/ command 'iceweasel -ProfileManager -no-remote'
gsettings set org.gnome.settings-daemon.plugins.media-keys.custom-keybinding:/org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/custom0/ name 'Iceweasel'
# Set the second (new) custom keybinding (key, command, name)
gsettings set org.gnome.settings-daemon.plugins.media-keys.custom-keybinding:/org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/custom1/ binding 'Calculator'
gsettings set org.gnome.settings-daemon.plugins.media-keys.custom-keybinding:/org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/custom1/ command 'qalculate-gtk'
gsettings set org.gnome.settings-daemon.plugins.media-keys.custom-keybinding:/org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/custom1/ name 'Qalculate'
如果一开始没有任何反应,请重新启动Gnome。在Gnome Shell中,它只是Alt+ F2,然后按r+Enter
参考文献:
1:以这个极好的答案作为建议:https : //askubuntu.com/a/597414/17564