feat: configurable open/popup shortcuts and window toggle - #10
Merged
Conversation
Register a configurable global shortcut that shows and focuses the main window, independent of the existing Ctrl+C double-press popup. The accelerator is loaded from settings on startup and can be re-registered at runtime through a set_open_hotkey command. Defaults to Ctrl+Shift+T.
Add openHotkey to the store defaults, load merge, and save payload so the chosen accelerator survives restarts.
Add a Shortcut section that records a modifier + key combo, applies it via set_open_hotkey, and persists it. A clear button unsets it.
The open hotkey only ever showed and focused the window. Toggle it instead: hide when it is already visible and focused, show otherwise, so the same key opens and dismisses the window.
The popup translate trigger was hardcoded to a double Ctrl+C press. Add a popupHotkey setting so it can be rebound from the settings panel. The rdev double-press mechanism and clipboard coupling are kept unchanged, and an empty value disables the popup. Stored in settings.json and applied on startup like the open hotkey.
gmcky
marked this pull request as ready for review
August 4, 2026 17:33
gmcky
force-pushed
the
feature/open-hotkey
branch
from
August 4, 2026 17:42
4cdd858 to
48888ae
Compare
Opening the main window through the hotkey, tray, or the Open menu item now focuses the text input so typing can start right away. It is tied to the open action rather than to window focus, so returning to the window by other means does not steal focus or clear a selection.
gmcky
force-pushed
the
feature/open-hotkey
branch
from
August 4, 2026 17:50
48888ae to
2e0e38c
Compare
If the component unmounts before listen() resolves, cleanup runs with no unlisten yet and the listener leaks. Track mount state and drop the listener as soon as it resolves when already unmounted.
Collaborator
|
Thank you! Can i push it? or you're fixing more things? |
Contributor
Author
|
Yeah, it's ready on my side, nothing else is coming. Good to merge whenever you want. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adds user-configurable global shortcuts and a toggle behaviour for the
main window.
What changed
recorder in Settings to rebind it.
visible and focused, and shows and focuses it otherwise, so one key
both summons and dismisses.
its own recorder. It was previously hardcoded to a double Ctrl+C.
The rdev double-press mechanism and clipboard coupling are unchanged,
an empty value disables the popup, and the default is platform-aware
(Cmd+C on macOS, Ctrl+C elsewhere).
text input so typing can start right away. It is tied to the open
action rather than window focus, so returning to the window by other
means does not steal focus or clear a selection.
Notes
copies the selection to the clipboard, then the popup reads it. So a
non-copy combo still opens the popup but on stale clipboard content;
the settings panel shows a hint about this.
fire the popup on every keystroke of that combo, since the listener
does not consume the key.
reading the clipboard, at the cost of injected keystrokes and
clipboard clobber.
Verification
in settings.json and reload on start
macOS