Skip to content

feat: add hotkeys, allow active preset to be changed by keypress#196

Merged
OpenSauce merged 3 commits intomainfrom
add-hotkeys
Feb 28, 2026
Merged

feat: add hotkeys, allow active preset to be changed by keypress#196
OpenSauce merged 3 commits intomainfrom
add-hotkeys

Conversation

@OpenSauce
Copy link
Copy Markdown
Owner

@OpenSauce OpenSauce commented Feb 28, 2026

Closes #79

Copilot AI review requested due to automatic review settings February 28, 2026 18:17
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds configurable keyboard hotkeys to load presets from the GUI, including a dedicated Hotkey Settings dialog and persisted mappings in the app settings.

Changes:

  • Persist hotkey mappings in Settings and expose a new hotkey module with (de)serialization + match logic.
  • Add a Hotkey Settings dialog + handler and wire new GUI messages for managing mappings.
  • Subscribe to global keyboard events and trigger preset selection when a mapping matches.

Reviewed changes

Copilot reviewed 11 out of 11 changed files in this pull request and generated 6 comments.

Show a summary per file
File Description
src/settings/mod.rs Adds HotkeySettings to persisted Settings with serde defaults.
src/lib.rs Exposes new hotkey module.
src/i18n/mod.rs Adds EN/ZH-CN translation strings for the hotkey dialog.
src/hotkey/mod.rs Implements hotkey mapping model, serialization helpers, and matching logic.
src/gui/messages/mod.rs Adds hotkey-related messages and a KeyPressed message.
src/gui/messages/hotkey.rs Defines HotkeyMessage enum for dialog interactions.
src/gui/handlers/mod.rs Registers the new hotkey handler module.
src/gui/handlers/hotkey.rs Introduces HotkeyHandler to manage dialog state + settings updates.
src/gui/components/dialogs/mod.rs Registers the new hotkey dialog module.
src/gui/components/dialogs/hotkey.rs Implements the Hotkey Settings dialog UI and learning flow.
src/gui/app.rs Wires the handler/dialog into the app, adds keyboard subscription, triggers preset changes on hotkeys.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread src/hotkey/mod.rs
Comment thread src/gui/components/dialogs/hotkey.rs
Comment thread src/hotkey/mod.rs
Comment thread src/settings/mod.rs
Comment thread src/gui/app.rs
Comment thread src/hotkey/mod.rs
@OpenSauce OpenSauce enabled auto-merge (squash) February 28, 2026 18:27
@OpenSauce OpenSauce merged commit 93d376d into main Feb 28, 2026
7 checks passed
@OpenSauce OpenSauce deleted the add-hotkeys branch February 28, 2026 18:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add Preset Hotkeys

2 participants