Add Multiple Modifier Key Support for Activation Hotkeys#5
Conversation
- AutoClicker: add activationModifiers computed property reading ActivationModifiers from UserDefaults; replace inline key check with matchesActivationKey() that verifies both key code and modifier state (Command/Option/Shift/Control only) - KeyCodeToCharTransformer: read ActivationModifiers from UserDefaults and prepend standard macOS symbols (⌃⌥⇧⌘) to the displayed key character - KeyPopoverViewController: update delegate protocol to pass NSEvent.ModifierFlags alongside keyCode; filter to relevant modifiers before forwarding - MainViewController: update keySelected() to save relevant modifiers to ActivationModifiers before saving ActivationKey (IB binding triggers display update) - Fix pre-existing bug: right mouse-up event was incorrectly sending leftMouseUp Made-with: Cursor
IB binding only re-evaluates KeyCodeToCharTransformer when ActivationKey changes. Removing the key before re-setting forces a value change even when the same key code is reused with different modifiers (e.g. 4 -> Shift+4). Made-with: Cursor
There was a problem hiding this comment.
Great addition, thanks!
However, it seems the modifier key combinations are buggy when using the Hold or Lock mode:
If I e.g. start holding ⌘ + K (pressing K first). Release ⌘ first and then K, the clicker remains enabled.
Maybe its enough if we just check for the main key (without modifier) in the Hold/Lock mode?
@O-mkar |
Add Multiple Modifier Key Support for Activation Hotkeys
🎯 Overview
Added support for modifier keys (⌘ Command, ⌥ Option, ⇧ Shift, ⌃ Control) in combination with activation hotkeys, enabling more flexible and conflict-free hotkey configurations.
✨ What's New
Previously, users could only set single keys (e.g., "4") as activation hotkeys. Now you can use modifier combinations like:
⇧4(Shift + 4)⌘C(Command + C)⌃⌥⇧A(Control + Option + Shift + A)🔧 Changes
Modified Files
MainViewController.swiftKeyCodeToCharTransformer.swiftKeyPopoverViewController.swiftKey Features
📋 Technical Details
New Data Storage