Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/macos/common.rs
Original file line number Diff line number Diff line change
Expand Up @@ -182,7 +182,7 @@ pub unsafe fn convert(
event => Some(EventType::ButtonRelease(Button::Unknown(event as u8))),
}
}
CGEventType::MouseMoved => {
CGEventType::MouseMoved | CGEventType::LeftMouseDragged | CGEventType::RightMouseDragged | CGEventType::OtherMouseDragged => {
Copy link

Copilot AI Jan 2, 2026

Choose a reason for hiding this comment

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

The new behavior of treating drag events as mouse move events lacks test coverage. Consider adding tests that verify LeftMouseDragged, RightMouseDragged, and OtherMouseDragged events are correctly converted to EventType::MouseMove, similar to the existing MouseMove tests in tests/listen_and_simulate.rs.

Copilot uses AI. Check for mistakes.
Copy link

Copilot AI Jan 2, 2026

Choose a reason for hiding this comment

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

The event mask kCGEventMaskForAllEvents is missing OtherMouseDragged. While this line correctly handles OtherMouseDragged events in the conversion logic, these events will never be received because they're not registered in the event mask. Add + (1 << CGEventType::OtherMouseDragged as u64) after line 71 in the event mask definition to ensure these events are captured.

Copilot uses AI. Check for mistakes.
let point = cg_event.location();
Some(EventType::MouseMove {
x: point.x,
Expand Down