diff --git a/README.md b/README.md index 07d60b5..cc0640d 100644 --- a/README.md +++ b/README.md @@ -35,6 +35,7 @@ Open `Package.swift` in Xcode to edit the project. Use the bundled app above to - Return, keypad Enter, the footer button, or a double-click opens the selected application or copies a calculator answer and dismisses the launcher. - Hold Command alone for one second to show numbered badges at the right edge of the first nine application results. Command already held when opening the launcher also counts: press Command-Space, release Space, and keep Command held. Newly discovered results start the delay once eligible. While still holding Command, press 1–9 to open that result or bring its running instance forward through the normal launch/history path. Numbers refer to the current ranked search results, not the selection or a scroll-relative position. Badges overlay the existing Application text, fading its right edge with an alpha mask while sliding in 14 points from the right over 160 milliseconds; Reduce Motion switches immediately. Releasing Command, pressing another key/modifier, losing focus, dismissing, or opening Actions/uninstall review cancels the hints. A cancelled hold does not restart just because results refresh or focus returns; release Command or reopen the launcher to start a new hold. Calculator/currency results and modal sheets do not enable numbered launching; missing result numbers do nothing. - Command-K or the bottom-right Actions button opens a searchable selector for the selected application. **Open** is first and selected by default. Up/Down or Control-K/Control-J selects an action; Return executes it. Escape closes the selector and returns focus to search. +- Closing Actions with Escape while Command is released leaves numbered hints ready for the next Command hold; cancellation waits for a release only when Command was actually held. - Escape or Command-W dismisses the launcher and restores the previously active application. Switching focus away dismisses it without stealing focus back. - Reopen from Finder to show it again with an empty search. Dismissal leaves the process running; Command-Q quits it. - Every activation brings the launcher to the currently active macOS Space, including full-screen Spaces, without switching desktops. diff --git a/Sources/Conjure/LauncherWindowController.swift b/Sources/Conjure/LauncherWindowController.swift index d0b762d..332e071 100644 --- a/Sources/Conjure/LauncherWindowController.swift +++ b/Sources/Conjure/LauncherWindowController.swift @@ -945,11 +945,12 @@ final class LauncherPanel: NSPanel { if wasVisible != numberShortcuts.isVisible { numberHintsChanged?() } } - func resetNumberHints() { + func resetNumberHints(modifierFlags: NSEvent.ModifierFlags = NSEvent.modifierFlags) { commandHoldTask?.cancel() commandHoldTask = nil let wasVisible = numberShortcuts.isVisible - numberShortcuts.cancel() + if commandOnly(modifierFlags) { numberShortcuts.cancel() } + else { numberShortcuts.reset() } if wasVisible { numberHintsChanged?() } } @@ -999,7 +1000,7 @@ final class LauncherPanel: NSPanel { if !event.isARepeat { launchNumber?(index) } return } - resetNumberHints() + resetNumberHints(modifierFlags: event.modifierFlags) } if event.type == .keyDown, attachedSheet == nil, event.modifierFlags.intersection([.control, .command, .option, .shift]) == .control { diff --git a/TODO.md b/TODO.md index e69de29..85463ae 100644 --- a/TODO.md +++ b/TODO.md @@ -0,0 +1,3 @@ +- [ ] add a favorite action to the list of actions and display the favorites on top of the other results. ranking then becomes split in two checks/passes: + - first, sort by rankings, then sort by favorites + - that should put the favorites first sorted by their ranking and then other applications sorted by their rankings below i believe \ No newline at end of file