添加到 lubuntu-rc.xml 的键盘快捷键不会在按键时执行

Til*_*ter 1 shortcut-keys lubuntu openbox

我想添加一个自定义键盘快捷键来控制 mplayer。mplayer 配置文件设置正确。

~/.config/openbox/lubuntu-rc.xml

<keybind key="XF86AudioPlay">
    <action name="Execute">
        <command>echo "pause" > /home/username/.mplayer/pipe</command>
    </action>
</keybind>
Run Code Online (Sandbox Code Playgroud)

按相应的键无效。执行命令本身(echo "pause" > /home/username/.mplayer/pipe在终端中)按预期工作。

有没有办法检查文件是否被正确解析和加载?

请帮忙。谢谢。

小智 5

一种方法是openbox --reconfigure从终端运行并查找可以帮助您解决问题的消息。

您确定已在<keyboard></keyboard>标签中添加了此代码吗?如果它在其他地方,它将被忽略。


查看您的代码,其中包含回声,我不确定 Openbox 是否会执行此类操作。只要 xml 结构和语法没问题,您可能不会收到错误消息。
如果您在这里没有得到答案,您可以在这里注册并询问:http : //icculus.org/mailman/listinfo/openbox。开发人员在那里闲逛并且乐于助人!