You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Add global hotkeys for toggling MiddleDrag and menu bar visibility (#121)
* Add global hotkeys for toggling MiddleDrag and menu bar visibility
- Implemented global hotkey ⌘⇧E to toggle MiddleDrag functionality.
- Implemented global hotkey ⌘⇧M to toggle the visibility of the menu bar icon.
- Updated MenuBarController to handle menu bar icon visibility and added corresponding menu item.
This enhances user accessibility and control over the application features.
* Implement hotkey customization and recording functionality
- Added a new HotKeyRecorderView for capturing user-defined hotkey combinations.
- Updated UserPreferences to include customizable hotkey bindings for toggling MiddleDrag and menu bar visibility.
- Enhanced MenuBarController to allow users to change hotkeys via the menu.
- Refactored hotkey registration logic in AppDelegate to support dynamic updates based on user preferences.
This improves user experience by providing flexibility in hotkey configuration.
* Add applicationShouldHandleReopen method and update menu item text
- Implemented applicationShouldHandleReopen in AppDelegate to toggle menu bar visibility when the application is reopened.
- Updated the menu item text in MenuBarController to clarify the method for restoring the menu bar icon.
These changes enhance user interaction with the application and improve clarity in the menu options.
* Implement cleanup for hotkey recording and improve alert handling
- Added a deinitializer in HotKeyRecorderView to ensure the local keyboard monitor is removed when the instance is deallocated.
- Introduced a cancelRecording method to stop any ongoing recording and clean up the keyboard monitor.
- Updated MenuBarController to call cancelRecording when an alert is dismissed, ensuring no leaked monitors occur.
These changes enhance memory safety and improve the user experience by preventing potential issues with lingering keyboard monitors.
* Refactor multitouch and hotkey handling for improved safety and functionality
- Updated MultitouchManager and related tests to ensure safe memory handling with the introduction of 'unsafe' keyword in critical areas.
- Enhanced AlertHelperTests and SystemGestureHelperTests to utilize 'unsafe' settings provider for better test isolation.
- Added new tests for GlobalHotKeyManager and HotKeyRecorderView to validate hotkey registration and recording functionality.
- Improved MenuBarController tests to ensure menu bar visibility toggling works as expected.
These changes enhance the robustness of multitouch and hotkey functionalities while ensuring better test coverage.
* Refactor menu bar visibility handling and enhance hotkey tests
- Updated AppDelegate to call showMenuBarIcon instead of toggleMenuBarVisibility for improved clarity.
- Added new tests for MenuBarController to verify the behavior of showMenuBarIcon under various conditions.
- Enhanced GlobalHotKeyManagerTests and HotKeyRecorderViewTests with additional test cases for better coverage and validation of hotkey functionality.
These changes improve the robustness of menu bar interactions and ensure comprehensive testing of hotkey features.
* Enhance MenuBarController to skip button click during tests
- Added a check to prevent the button click action in MenuBarController when running tests, avoiding modal menu loops that can stall CI processes.
This change improves test reliability and ensures smoother continuous integration workflows.
* Refactor MenuBarController hotkey handling for improved safety
- Updated hotkey binding closures in MenuBarController to use guard statements for safer self-referencing.
- This change enhances memory safety by preventing potential retain cycles and ensures smoother execution of hotkey updates.
These improvements contribute to the overall robustness of the menu bar functionality.
0 commit comments