feat: migrate camera shortcut and helper scripts - #143
Conversation
Add the missing XF86WebCam shortcut and preserve the legacy camera toggle behavior. Move the camera and grand-search helpers under dde-services-owned paths so removing the legacy dde-daemon keybinding module does not break these shortcut actions. Keep using dde-daemon's independently installed default-terminal binary to preserve its complete launch behavior. Update registrations and the multimedia key conversion test. 补充缺失的 XF86WebCam 快捷键并保持旧方案的相机开关行为。将相机和全局搜索辅助脚本迁移到 dde-services 自有路径,避免删除 dde-daemon 旧快捷键模块后相关动作失效。默认终端继续使用 dde-daemon 独立安装的二进制,以保留完整启动行为,同时更新注册配置及多媒体按键转换测试。 Log: feat: migrate camera shortcut and helper scripts Change-Id: I27802397bd46699778372d6d99c09231dcd3b55c
There was a problem hiding this comment.
Sorry @yixinshark, you have reached your weekly rate limit of 500000 diff characters.
Please try again later or upgrade to continue using Sourcery
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: yixinshark The full list of commands accepted by this bot can be found here. DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
Reviewer's guide (collapsed on small PRs)Reviewer's GuideMigrates shortcut helper scripts to a dde-services-owned libexec path, wires the grand-search toggle to the new script, and adds full support (config + tests + script) for the XF86WebCam camera shortcut while keeping the default-terminal shortcut on the existing dde-daemon binary. Sequence diagram for XF86WebCam camera shortcut executionsequenceDiagram
actor User
participant ShortcutDaemon
participant ServiceActionExecutor
participant ActionExecutor
participant CameraSwitchScript
User->>ShortcutDaemon: XF86WebCam keypress
ShortcutDaemon->>ServiceActionExecutor: execute(actionId, context)
alt [webcam shortcut]
ServiceActionExecutor->>ActionExecutor: executeCommand("/usr/libexec/dde-services/keybinding/camera-switch")
ActionExecutor->>CameraSwitchScript: start
end
Sequence diagram for grand-search toggle shortcut executionsequenceDiagram
actor User
participant ShortcutDaemon
participant ServiceActionExecutor
participant ActionExecutor
participant ToggleGrandSearchScript
User->>ShortcutDaemon: grand-search shortcut
ShortcutDaemon->>ServiceActionExecutor: execute(actionId, context)
alt [ToggleGrandSearch]
ServiceActionExecutor->>ActionExecutor: executeCommand("/usr/libexec/dde-services/keybinding/toggle-grand-search")
ActionExecutor->>ToggleGrandSearchScript: start
end
Flow diagram for migrated shortcut helper script locationsflowchart TD
ShortcutPlugin["plugin-qt shortcut module"]
DdeServicesLibexec["/usr/libexec/dde-services/keybinding"]
DdeDaemonLibexec["/usr/libexec/dde-daemon/keybinding"]
CameraSwitch["camera-switch script"]
ToggleGrandSearch["toggle-grand-search script"]
DefaultTerminal["default-terminal binary"]
ShortcutPlugin --> DdeServicesLibexec
DdeServicesLibexec --> CameraSwitch
DdeServicesLibexec --> ToggleGrandSearch
ShortcutPlugin --> DdeDaemonLibexec
DdeDaemonLibexec --> DefaultTerminal
File-Level Changes
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
deepin pr auto review★ 总体评分:100分■ 【总体评价】
■ 【详细分析】
■ 【改进建议代码示例】 --- a/src/plugin-qt/shortcut/scripts/toggle-grand-search
+++ b/src/plugin-qt/shortcut/scripts/toggle-grand-search
@@ -1,5 +1,6 @@
#!/bin/sh
# SPDX-FileCopyrightText: 2026 UnionTech Software Technology Co., Ltd.
# SPDX-License-Identifier: LGPL-3.0-or-later
+set -e
service=com.deepin.dde.GrandSearch
object_path=/com/deepin/dde/GrandSearch |
Summary
Test plan
sh -non both helper scriptsjqshortcut-qkeysequenceconverter0755Summary by Sourcery
Migrate camera and grand search shortcut handling to dde-services while adding support for the XF86WebCam key.
New Features:
Enhancements:
Tests: