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

Đang mở
#944 1 bình luận 0 reaction 0 người được giao Xem trên GitHub

Chưa có ai nhận issue này.

Đánh giá

Độ khó
3/5
Thời gian dự kiến
1-2 ngày
Mức phù hợp với người mới
35/100
Loại issue
Lỗi
Độ rõ ràng
Đặc tả rõ ràng
Mức độ hoạt động
Sôi nổi
Công nghệ
macos, swift
Lĩnh vực
desktop

Hướng nghiên cứu

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.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

[!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.
Ngôn ngữ chính
Không có dữ liệu ngôn ngữ
Star
156
Fork
1
Chỉ số merge pull request
Không có pull request nào được merge trong 30 ngày

Chuẩn bị môi trường

Dự án này không cung cấp dev container, Dockerfile hay hướng dẫn đóng góp, nên bạn cần tự thiết lập môi trường: hãy bắt đầu từ README và xem hướng dẫn đóng góp lần đầu của chúng tôi để biết các bước chung.

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của rxhanson/RectanglePro-Community

Tất cả issue của rxhanson/RectanglePro-Community

Issue tương tự

Thêm issue về Desktop Dev

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.