rxhanson / Rectangle

Move and resize windows on macOS with keyboard shortcuts and snap areas
https://rectangleapp.com
Other
25.09k stars 741 forks source link

"Import settings" does not clear out shortcut keys that doesn't exist in the imported config. #1346

Open wolf0403 opened 3 months ago

wolf0403 commented 3 months ago

macOS version: 14.4 Rectangle version: 0.76(82) Logs if applicable (In Rectangle menu, hold option, "View Logging..."):

steps:

  1. Config shortcut keys, clear out a few (e.g. i left "Almost Maximize" to "Record Shortcut" in Settings)
  2. Export and save the settings JSON file.
  3. Add shortcut for e.g. "Almost Maximize"
  4. Import the JSON settings file previously exported

I was hoping this would set the shortcut keys to exactly the state I exported it, but seem at least the shortcut keys that were not in the JSON settings were kept untouched rather than cleared.

rxhanson commented 3 months ago

Thanks for reporting. I'll slate this one for the next release.

wolf0403 commented 3 months ago

Also, probably should be a separate issue - this may cause conflict shortcut keys to co-exist.

On my machine 2 with default (?) shortcut keys ctl-opt-g is mapped to "Last Third" (by default?) On my machine 1 I cleared "Last Third" and assigned ctl-opt-g to "Maximize". I exported config from machine 1, imported in machine 2, which sets "Maximize" to ctl-opt-g but "Last Third" is also ctl-alt-g and seems to be taking precedent. It also seems I'll need to remove all conflicting shortcut keys and re-assign it to the one I want for it to take effect, which defeats the purpose of importing config entirely :)

Also this isn't super obvious as the "thirds" are by default hidden in the setting panel.

While trying to work out the behaviour here I'm surprised that I can actually assign the same shortcut keys to different functionality and UI would silently accept it (the previously assigned functionality will never be activated even if I clear out the shortcut key on the newly assigned slot - need to clear both and re-assign).

Detecting and warning about conflicting shortcut keys in Settings UI and importing config could probably be a separate FR.