如何可以话 希望可以提供一下相关的资料 非常感谢
你可以通过dbus调用添加自定义快捷键的方法,如果是shell里,推荐用qdbus比较方便:
qdbus org.deepin.dde.Keybinding1 /org/deepin/dde/Keybinding1 org.deepin.dde.Keybinding1.AddCustomShortcut test1 test2 "1"
效果:
相关的dbus接口定义在这里:https://github.com/linuxdeepin/dde-api-proxy/blob/master/file/dbus/v1/session/org.deepin.dde.Keybinding1.xml
使用:https://github.com/linuxdeepin/dde-control-center/blob/2013c421ea942eb340df65731dfccff0208db331/src/plugin-keyboard/operation/keyboardwork.cpp#L224
C++也是操作dbus。
你可以通过dbus调用添加自定义快捷键的方法,如果是shell里,推荐用qdbus比较方便:
qdbus org.deepin.dde.Keybinding1 /org/deepin/dde/Keybinding1 org.deepin.dde.Keybinding1.AddCustomShortcut test1 test2 "1"
效果:
相关的dbus接口定义在这里:https://github.com/linuxdeepin/dde-api-proxy/blob/master/file/dbus/v1/session/org.deepin.dde.Keybinding1.xml
使用:https://github.com/linuxdeepin/dde-control-center/blob/2013c421ea942eb340df65731dfccff0208db331/src/plugin-keyboard/operation/keyboardwork.cpp#L224
C++也是操作dbus。
补充一下,当前添加的自定义快捷键的配置文件路径是 ~/.config/deepin/dde-daemon/keybinding/custom.ini
如果组合键不会写,可以先通过控制中心添加,然后参考这里的写法。
补充一下,当前添加的自定义快捷键的配置文件路径是 ~/.config/deepin/dde-daemon/keybinding/custom.ini
如果组合键不会写,可以先通过控制中心添加,然后参考这里的写法。
非常感谢 一直在工作 回复晚了谢
Popular Events
More
深度系统的快捷键 是否可以通过 c++ 或者 shell 调用终端命令完整快捷键的注册