feat(shortcuts): add duplicate shortcut cycling#1759
Conversation
- Suspend shortcut bindings while recording shortcuts - Reject todo shortcut conflicts without already-used alerts - Cover overlapping shortcut recording state
|
Thanks for contributing! I quickly glanced through the changes and will give this a more thorough run-through soon. I didn't quite catch it - how is the ordering determined for which action gets executed first if there are multiple actions with the same keyboard shortcut? This change sort of recenters the ShortcutManager around this functionality, and I'm thinking there might be a more elegant way to achieve this while keeping it a little more separate. When I dive into this a bit deeper, I think I'll have a more clear picture of how to do this. |
|
I see what you're saying. This leaks shortcut-recording UI state into ShortcutManager. The cycling logic may belong there, but this pause/resume behavior needs a cleaner boundary. Let me know your thoughts and preferred direction. |
|
Sorry for the delay. The reason for thinking down the path of reducing some of the responsibility of the ShortcutManager is that I am planning to swap out MASShortcut and would like to keep some of the MASShortcut interaction as isolated as possible. I'm actually finding it difficult to draw the line in ShortcutManager, though - do you have any thoughts on a good way to do this? It's nice to have the struct for keeping the cycling organization separate, but maybe there's a good way to pull more of the ShortcutManager class modifications out. Aside from that things are looking good. |
Related Discussion: #1758
Summary
Verification
xcodebuild test -project Rectangle.xcodeproj -scheme Rectangle -destination 'platform=macOS' -derivedDataPath /private/tmp/RectangleDerivedDataxcodebuild build -project Rectangle.xcodeproj -scheme Rectangle -destination 'platform=macOS' -derivedDataPath /private/tmp/RectangleDerivedDataDisclaimer
This implementation was Codex-assisted.