Skip to content

fix: align default window switching shortcuts - #121

Open
yixinshark wants to merge 1 commit into
linuxdeepin:masterfrom
yixinshark:fix/align-default-shortcuts
Open

fix: align default window switching shortcuts#121
yixinshark wants to merge 1 commit into
linuxdeepin:masterfrom
yixinshark:fix/align-default-shortcuts

Conversation

@yixinshark

@yixinshark yixinshark commented Aug 3, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Align four window-switching shortcut configurations with the desktop defaults.
  • Remove obsolete alternative bindings and correct reverse/window-effects combinations.
  • Set the updated hotkey serial values to 1.

Test plan

  • Validate all modified JSON files with jq.
  • Run git diff --check.

Pms: BUG-372017

Summary by Sourcery

Align window-switching shortcut configurations with desktop defaults and clean up obsolete bindings.

Bug Fixes:

  • Correct window-switching shortcut bindings to match expected desktop behavior and remove incorrect reverse/effects combinations.

Enhancements:

  • Normalize hotkey configuration for four window-switching actions and reset their serial values for consistency across shortcut definitions.

Align four window switching shortcut definitions with the desktop defaults.
- Remove obsolete alternative bindings for same-application window switching.
- Correct the reverse window switch and window effects switch combinations.
- Bump the hotkey serial values so updated defaults are applied.

将四项窗口切换快捷键配置与桌面默认值保持一致。
- 移除同类型窗口切换中已废弃的备用按键组合。
- 修正反向切换窗口和切换窗口效果的按键组合。
- 更新快捷键序列号,使新的默认值生效。

Log: align default window switching shortcuts
Pms: BUG-372017
Change-Id: I29c2b19df6a65eeef7685c1e075917cdee2f28b9
@deepin-ci-robot

Copy link
Copy Markdown

[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.

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@sourcery-ai

sourcery-ai Bot commented Aug 3, 2026

Copy link
Copy Markdown
Reviewer's guide (collapsed on small PRs)

Reviewer's Guide

This PR updates four JSON shortcut configuration files to align window-switching hotkeys with desktop defaults, cleaning up obsolete bindings and normalizing metadata (including serial values).

File-Level Changes

Change Details Files
Align window-switching shortcut bindings with desktop defaults.
  • Update primary key combinations for previous-task switching to match desktop standard
  • Adjust same-app next/previous window-switch shortcuts to the expected key sequences
  • Ensure the window manager switcher shortcut uses the correct default binding
src/plugin-qt/shortcut/dde-app-shortcuts/configs/org.deepin.dde.keybinding.shortcut.app.taskswitch-prev/org.deepin.shortcut.json
src/plugin-qt/shortcut/dde-app-shortcuts/configs/org.deepin.dde.keybinding.shortcut.app.taskswitch-sameapp-next/org.deepin.shortcut.json
src/plugin-qt/shortcut/dde-app-shortcuts/configs/org.deepin.dde.keybinding.shortcut.app.taskswitch-sameapp-prev/org.deepin.shortcut.json
src/plugin-qt/shortcut/dde-app-shortcuts/configs/org.deepin.dde.keybinding.shortcut.app.wm-switcher/org.deepin.shortcut.json
Clean up obsolete and inconsistent shortcut metadata.
  • Remove deprecated alternative bindings from the updated shortcuts
  • Fix any incorrect reverse or window-effect combinations in the shortcut configuration entries
  • Set the hotkey serial (versioning) fields to 1 for all updated shortcuts
src/plugin-qt/shortcut/dde-app-shortcuts/configs/org.deepin.dde.keybinding.shortcut.app.taskswitch-prev/org.deepin.shortcut.json
src/plugin-qt/shortcut/dde-app-shortcuts/configs/org.deepin.dde.keybinding.shortcut.app.taskswitch-sameapp-next/org.deepin.shortcut.json
src/plugin-qt/shortcut/dde-app-shortcuts/configs/org.deepin.dde.keybinding.shortcut.app.taskswitch-sameapp-prev/org.deepin.shortcut.json
src/plugin-qt/shortcut/dde-app-shortcuts/configs/org.deepin.dde.keybinding.shortcut.app.wm-switcher/org.deepin.shortcut.json

Tips and commands

Interacting with Sourcery

  • Trigger a new review: Comment @sourcery-ai review on the pull request.
  • Continue discussions: Reply directly to Sourcery's review comments.
  • Generate a GitHub issue from a review comment: Ask Sourcery to create an
    issue from a review comment by replying to it. You can also reply to a
    review comment with @sourcery-ai issue to create an issue from it.
  • Generate a pull request title: Write @sourcery-ai anywhere in the pull
    request title to generate a title at any time. You can also comment
    @sourcery-ai title on the pull request to (re-)generate the title at any time.
  • Generate a pull request summary: Write @sourcery-ai summary anywhere in
    the pull request body to generate a PR summary at any time exactly where you
    want it. You can also comment @sourcery-ai summary on the pull request to
    (re-)generate the summary at any time.
  • Generate reviewer's guide: Comment @sourcery-ai guide on the pull
    request to (re-)generate the reviewer's guide at any time.
  • Resolve all Sourcery comments: Comment @sourcery-ai resolve on the
    pull request to resolve all Sourcery comments. Useful if you've already
    addressed all the comments and don't want to see them anymore.
  • Dismiss all Sourcery reviews: Comment @sourcery-ai dismiss on the pull
    request to dismiss all existing Sourcery reviews. Especially useful if you
    want to start fresh with a new review - don't forget to comment
    @sourcery-ai review to trigger a new review!

Customizing Your Experience

Access your dashboard to:

  • Enable or disable review features such as the Sourcery-generated pull request
    summary, the reviewer's guide, and others.
  • Change the review language.
  • Add, remove or edit custom review instructions.
  • Adjust other review settings.

Getting Help

@sourcery-ai sourcery-ai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey - I've reviewed your changes and they look great!


Sourcery is free for open source - if you like our reviews please consider sharing them ✨
Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.

@deepin-ci-robot

Copy link
Copy Markdown

deepin pr auto review

★ 总体评分:95分

■ 【总体评价】

代码实现了快捷键冲突的解决和配置的规范化统一,逻辑清晰。
逻辑正确且规范了快捷键映射,无安全风险,因配置项的微小一致性可进一步优化扣5分。

■ 【详细分析】

  • 1.语法逻辑(基本正确)✓

修改了四个 JSON 配置文件,移除了冲突的快捷键并重新分配,JSON 语法完全正确。serial 值从 0 递增到 1,确保配置能被系统重新加载生效。
潜在问题:无
建议:无

  • 2.代码质量(良好)✓

代码变更解决了 taskswitch-prevwm-switcher 之间 Shift+Meta+Tab 的快捷键冲突,统一了 taskswitch 系列使用 Alt 修饰键的规范。
潜在问题:taskswitch-sameapp-prev 使用了 Alt+Shift+~,而其他切换多使用 Tab,且与 sameapp-nextAlt+ 组合在按键上不完全对称,可能对用户习惯造成一定影响。
建议:确认 ~ 键的映射在所有键盘布局下表现一致,并考虑与 sameapp-next 保持键位的对称性。

  • 3.代码性能(无性能问题)✓

配置文件的修改对运行时性能无直接影响,仅影响初始化加载时的键位绑定。
潜在问题:无
建议:无

  • 4.代码安全(存在0个安全漏洞)✓

漏洞对比统计:新增漏洞 0 个,减少漏洞 0 个,持平 0 个
本次修改仅涉及快捷键配置的字符串和 serial 字段,不涉及任何用户输入处理、文件操作或权限控制,不存在安全风险。

  • 建议:无

■ 【改进建议代码示例】

diff --git a/src/plugin-qt/shortcut/dde-app-shortcuts/configs/org.deepin.dde.keybinding.shortcut.app.taskswitch-sameapp-prev/org.deepin.shortcut.json b/src/plugin-qt/shortcut/dde-app-shortcuts/configs/org.deepin.dde.keybinding.shortcut.app.taskswitch-sameapp-prev/org.deepin.shortcut.json
index 2888501..daedc80 100644
--- a/src/plugin-qt/shortcut/dde-app-shortcuts/configs/org.deepin.dde.keybinding.shortcut.app.taskswitch-sameapp-prev/org.deepin.shortcut.json
+++ b/src/plugin-qt/shortcut/dde-app-shortcuts/configs/org.deepin.dde.keybinding.shortcut.app.taskswitch-sameapp-prev/org.deepin.shortcut.json
@@ -34,10 +34,9 @@
         },
         "hotkeys": {
             "value": [
-                "Shift+Meta+`",
-                "Shift+Alt+`"
+                "Alt+Shift+`"
             ],
-            "serial": 0,
+            "serial": 1,
             "flags": [],
             "name": "hotkeys",
             "name[zh_CN]": "快捷键组合",

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants