Skip to content

Include mouse settings#53

Merged
pablopunk merged 4 commits intopablopunk:mainfrom
danini-the-panini:with-mouse-buttons
Jun 11, 2024
Merged

Include mouse settings#53
pablopunk merged 4 commits intopablopunk:mainfrom
danini-the-panini:with-mouse-buttons

Conversation

@danini-the-panini
Copy link
Contributor

@danini-the-panini danini-the-panini commented Jun 11, 2024

Continuing on the work done in #22 resolving #16

  1. Store and Load mouse settings
  2. Add CGEventSupervisor as a dependency, since it allows intercepting global mouse events synchronously with the ability to cancel (prevents context menu popping up when right-clicking, etc.)
  3. Track mouse button on shortcut instead of tracking mouse move immediately
  4. Track appropriate mouse move event for the given mouse button option

I tried to take a video but because the mouse clicks are intercepted, they don't show up in any recording software I try use.

@codesandbox
Copy link

codesandbox bot commented Jun 11, 2024

Review or Edit in CodeSandbox

Open the branch in Web EditorVS CodeInsiders

Open Preview

} else {
MouseTracker.shared.stopTracking(for: action)
startTracking(userShortcut, action)
}
Copy link
Contributor Author

Choose a reason for hiding this comment

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

I took out the else here since it seemed redundant to call stopTracking twice

@pablopunk
Copy link
Owner

Works great! Thanks!

@pablopunk pablopunk merged commit 7ea7d2f into pablopunk:main Jun 11, 2024
@danini-the-panini danini-the-panini deleted the with-mouse-buttons branch June 12, 2024 05:18
@pablopunk pablopunk mentioned this pull request Jun 12, 2024
3 tasks
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