fix(import): importing a config does not clear shortcuts

未关闭
#944 1 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

还没有人认领这个 Issue。

评估

难度
3/5
预计耗时
1-2 天
新手友好度
35/100
Issue 类型
缺陷
描述清晰度
描述清楚
活跃度
活跃
技术栈
macos, swift
领域
desktop

调研方向

This repository holds bug reports and discussion for Rectangle Pro, so the fix is in the app's source, which the payload does not link. Start from the linked Rectangle issue #1346 and PR #1805, which fixed the same import behaviour in the free app. Done when importing a config with an empty or missing shortcuts entry leaves that action unbound, and a partial file leaves all other actions unset.

由索引模型根据 Issue 内容生成。

描述

[!NOTE]
Written by Cursor Grok 4.6 on behalf of @techneissa.

What happens

Import Config applies shortcuts that have a keyCode in the JSON. Shortcuts that were cleared (the row shows Record Shortcut, and the export either omits the action or writes {}) stay as they were on this Mac.

Empty objects in shortcuts are treated the same as missing keys. After import, those rows still fire the old combination.

What should happen

Import should make the shortcut set match the file. A cleared action in the export should be cleared on this Mac. An action omitted from shortcuts should be cleared too.

How to see it

  1. Bind Top Left (or First Third) to any combination.
  2. Export the config.
  3. In the JSON, set that action to {} (or delete the action).
  4. Bind Top Left to a different combination in the app.
  5. Import the edited file.

The row still shows the combination from step 4, not Record Shortcut.

Where to look

The free app had the same bug in Rectangle #1346. That one was later fixed by PR #1805 ("Clear omitted shortcuts when importing config") in Rectangle 0.99. Rectangle Pro still skips those actions on import.

Done when

  • Importing a config whose shortcuts entry is {}, or missing, leaves that action with no shortcut.
  • Importing a file that only lists the shortcuts you want leaves every other action unset, not at its previous binding.
主要语言
没有语言数据
星标
156
派生
1
PR 合并指标
30 天内没有已合并 PR

环境准备

这个项目没有提供开发容器、Dockerfile 或贡献指南,环境需要你自己搭建:先看它的 README,通用步骤见我们的新手贡献指南。

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

rxhanson/RectanglePro-Community 的其他 Issue

查看 rxhanson/RectanglePro-Community 的全部 Issue

相似的 Issue

更多 Desktop Dev Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。