Repository navigation
refactor(app): rebuild settings in GPUI with cleaner layers and reliable key capture - #15
Merged
Merged
Conversation
Replace iced with upstream gpui 0.2.2. The app crate is now split into a toolkit-free controller, user-facing copy, a GPUI ui module (theme, components, settings window), and platform glue. Trigger rebinding uses a one-shot low-level capture hook so the captured key matches what the engine sees, classified by pure core logic. Background threads feed one event channel drained on the main thread instead of a 500 ms poll. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Binding Space or Enter re-armed capture: the hook was gone before the key-up, and GPUI clicks the focused keycap on that key-up. Dropping a KeyCapture now stops reporting at once but keeps the hook until the keys it swallowed are released. Also cancel capture on reveal, treat an empty HYPERKEY_SETTINGS_DIR as unset, and drop the unused scan_code field. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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.
The settings app was on iced, and the app crate had grown into one big view file that mixed UI, Win32 glue and app logic. This moves the settings window to GPUI, splits the app into clean layers, polishes the settings UI and makes a few things more reliable.
What changes for users
Structure
crates/hyperkey-app/src/:controller.rs: app state and logic, with no UI toolkit code; it carries the tests that were already there.copy.rs: all user-facing text.ui/: theme, components and the settings window.platform/: Win32 glue.app.rs: wiring.hyperkey-core::keys::classify_capture, which is pure and tested. The capture hook is inhyperkey-input::capture.HYPERKEY_SETTINGS_DIRpoints a dev build at scratch settings and skips the startup registry entry.Proof
cargo clippy --workspace --all-targets -- -D warnings: clean.cargo test --workspace: all pass (app 38, core 72, input 24).--traystarts hidden.Known gaps (follow-ups)
After
There is no before screenshot: building the old iced app again would have meant a heavy rebuild on a busy machine.
Reviewed with smol-loop: 2 rounds with Sonnet. Minion verdict: approved
Created with Claude Opus 5.5 in Claude Code, with Sonnet subagents.
🤖 Generated with Claude Code