Skip to content

Feat/global hotkey settings#4

Open
abhaymundhara wants to merge 3 commits into
LiamFuller07:mainfrom
abhaymundhara:feat/global-hotkey-settings
Open

Feat/global hotkey settings#4
abhaymundhara wants to merge 3 commits into
LiamFuller07:mainfrom
abhaymundhara:feat/global-hotkey-settings

Conversation

@abhaymundhara

Copy link
Copy Markdown

Description

Added a customizable global hotkey feature to the Settings dialog. Users can now record, save, and reset their preferred keyboard shortcut for activating OpenWork. The feature includes real-time recording, validation, error handling, and animated toast notifications for user feedback.

Key additions:

  • Interactive hotkey recorder with live key capture
  • Save/Reset functionality with persistence via IPC
  • Toast notifications with slide-in animations for success/error states
  • Cross-platform support (CommandOrControl maps to Cmd on macOS, Ctrl elsewhere)
  • ESC key to cancel recording
  • Visual feedback during recording state
  • Input validation and conflict detection

Type of Change

  • Bug fix
  • New feature
  • Breaking change
  • Documentation update

How Has This Been Tested?

Manual Testing:

  1. Recording hotkeys

    • Opened Settings dialog
    • Clicked "Record" button
    • Pressed various key combinations (Cmd+K, Ctrl+Shift+P, Alt+Space)
    • Verified accelerator format displays correctly
    • Pressed ESC to cancel recording
  2. Saving hotkeys

    • Saved valid hotkeys and verified toast success message
    • Attempted to save invalid/conflicting hotkeys and verified error toast
    • Closed and reopened dialog to confirm persistence
  3. Resetting hotkeys

    • Changed hotkey from default
    • Clicked "Reset" button
    • Verified return to CommandOrControl+; with success toast
  4. UI/UX

    • Tested responsive layout on different window sizes
    • Verified toast animations (slide-in from right, fade-out)
    • Confirmed placeholder text is visible
    • Checked button states during recording

Platforms tested:

  • macOS (Cmd key mapping)
  • Windows (Ctrl key mapping)
  • Linux (Ctrl key mapping)

Edge cases:

  • Recording with no modifiers (handled gracefully)
  • Rapid key presses during recording
  • Dialog close while recording (cleanup verified)
  • Empty hotkey input validation

Checklist

  • My code follows the project's style guidelines
  • I have performed a self-review
  • I have added tests if applicable
  • I have updated documentation if needed (README.md includes feature description)

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.

1 participant