Skip to content

feat: add hotkeys functionality#52

Merged
conventoangelo merged 14 commits intomainfrom
feat/hotkeys
Mar 30, 2025
Merged

feat: add hotkeys functionality#52
conventoangelo merged 14 commits intomainfrom
feat/hotkeys

Conversation

@conventoangelo
Copy link
Copy Markdown
Owner

This pull request to lib/app.dart introduces hotkey functionality, optimizes the initialization process, and refactors several methods for better readability and maintainability. The most important changes include the addition of hotkey settings, refactoring of Kanata service methods, and the introduction of a _toggleAutoHide method to simplify auto-hide toggling.

Hotkey Functionality:

  • Added hotkey settings and initialization in _MainAppState, allowing users to toggle visibility and auto-hide using predefined hotkeys. ([[1]](https://github.com/conventoangelo/OverKeys/pull/52/files#diff-1fb04a3749d56cc322a1bc7e7e6b8988600930c339b0d8df7119837e1b7ae20dR92-R102), [[2]](https://github.com/conventoangelo/OverKeys/pull/52/files#diff-1fb04a3749d56cc322a1bc7e7e6b8988600930c339b0d8df7119837e1b7ae20dR192-R196), [[3]](https://github.com/conventoangelo/OverKeys/pull/52/files#diff-1fb04a3749d56cc322a1bc7e7e6b8988600930c339b0d8df7119837e1b7ae20dL496-R548))

Kanata Service Refactoring:

  • Refactored Kanata service connection and configuration methods, combining them into _useKanata for better clarity and maintainability. ([[1]](https://github.com/conventoangelo/OverKeys/pull/52/files#diff-1fb04a3749d56cc322a1bc7e7e6b8988600930c339b0d8df7119837e1b7ae20dL112-R126), [[2]](https://github.com/conventoangelo/OverKeys/pull/52/files#diff-1fb04a3749d56cc322a1bc7e7e6b8988600930c339b0d8df7119837e1b7ae20dL241-L270), [[3]](https://github.com/conventoangelo/OverKeys/pull/52/files#diff-1fb04a3749d56cc322a1bc7e7e6b8988600930c339b0d8df7119837e1b7ae20dL626-L637))

Auto-Hide Management:

  • Introduced _toggleAutoHide method to handle auto-hide state changes and update all sub-windows accordingly, improving code readability and reducing duplication. ([[1]](https://github.com/conventoangelo/OverKeys/pull/52/files#diff-1fb04a3749d56cc322a1bc7e7e6b8988600930c339b0d8df7119837e1b7ae20dL417-R435), [[2]](https://github.com/conventoangelo/OverKeys/pull/52/files#diff-1fb04a3749d56cc322a1bc7e7e6b8988600930c339b0d8df7119837e1b7ae20dL457-R474), [[3]](https://github.com/conventoangelo/OverKeys/pull/52/files#diff-1fb04a3749d56cc322a1bc7e7e6b8988600930c339b0d8df7119837e1b7ae20dL564-R604))

Initialization Optimization:

  • Merged and streamlined initialization methods for startup settings and preferences, reducing redundant code and improving the initialization process. ([[1]](https://github.com/conventoangelo/OverKeys/pull/52/files#diff-1fb04a3749d56cc322a1bc7e7e6b8988600930c339b0d8df7119837e1b7ae20dR114-L103), [[2]](https://github.com/conventoangelo/OverKeys/pull/52/files#diff-1fb04a3749d56cc322a1bc7e7e6b8988600930c339b0d8df7119837e1b7ae20dL299-R311))

Code Cleanup:

  • Removed debug print statements and unnecessary comments to clean up the codebase, making it more concise and easier to read. ([[1]](https://github.com/conventoangelo/OverKeys/pull/52/files#diff-1fb04a3749d56cc322a1bc7e7e6b8988600930c339b0d8df7119837e1b7ae20dL282-L284), [[2]](https://github.com/conventoangelo/OverKeys/pull/52/files#diff-1fb04a3749d56cc322a1bc7e7e6b8988600930c339b0d8df7119837e1b7ae20dL603-L605))

@conventoangelo conventoangelo requested a review from Copilot March 30, 2025 05:46
Copy link
Copy Markdown

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.

Copilot reviewed 8 out of 28 changed files in this pull request and generated no comments.

Files not reviewed (20)
  • lib/app.dart: Language not supported
  • lib/main.dart: Language not supported
  • lib/screens/preferences_screen.dart: Language not supported
  • lib/services/kanata_service.dart: Language not supported
  • lib/services/preferences_service.dart: Language not supported
  • lib/widgets/dialog/record_hotkey.dart: Language not supported
  • lib/widgets/options/base_option.dart: Language not supported
  • lib/widgets/options/color_option.dart: Language not supported
  • lib/widgets/options/dropdown_option.dart: Language not supported
  • lib/widgets/options/hotkey_option.dart: Language not supported
  • lib/widgets/options/options.dart: Language not supported
  • lib/widgets/options/slider_option.dart: Language not supported
  • lib/widgets/options/toggle_option.dart: Language not supported
  • lib/widgets/preferences/preference_option_widgets.dart: Language not supported
  • lib/widgets/tabs/about_tab.dart: Language not supported
  • lib/widgets/tabs/appearance_tab.dart: Language not supported
  • lib/widgets/tabs/general_tab.dart: Language not supported
  • lib/widgets/tabs/hotkeys_tab.dart: Language not supported
  • lib/widgets/tabs/keyboard_tab.dart: Language not supported
  • lib/widgets/tabs/text_tab.dart: Language not supported

@conventoangelo conventoangelo requested a review from Copilot March 30, 2025 05:46
Copy link
Copy Markdown

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.

Copilot reviewed 8 out of 28 changed files in this pull request and generated no comments.

Files not reviewed (20)
  • lib/app.dart: Language not supported
  • lib/main.dart: Language not supported
  • lib/screens/preferences_screen.dart: Language not supported
  • lib/services/kanata_service.dart: Language not supported
  • lib/services/preferences_service.dart: Language not supported
  • lib/widgets/dialog/record_hotkey.dart: Language not supported
  • lib/widgets/options/base_option.dart: Language not supported
  • lib/widgets/options/color_option.dart: Language not supported
  • lib/widgets/options/dropdown_option.dart: Language not supported
  • lib/widgets/options/hotkey_option.dart: Language not supported
  • lib/widgets/options/options.dart: Language not supported
  • lib/widgets/options/slider_option.dart: Language not supported
  • lib/widgets/options/toggle_option.dart: Language not supported
  • lib/widgets/preferences/preference_option_widgets.dart: Language not supported
  • lib/widgets/tabs/about_tab.dart: Language not supported
  • lib/widgets/tabs/appearance_tab.dart: Language not supported
  • lib/widgets/tabs/general_tab.dart: Language not supported
  • lib/widgets/tabs/hotkeys_tab.dart: Language not supported
  • lib/widgets/tabs/keyboard_tab.dart: Language not supported
  • lib/widgets/tabs/text_tab.dart: Language not supported

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.

2 participants