Skip to content

Commit

Permalink
.
Browse files Browse the repository at this point in the history
  • Loading branch information
pentamassiv committed Jan 6, 2024
1 parent c753e8d commit 2d3cb88
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/macos/macos_impl.rs
Original file line number Diff line number Diff line change
Expand Up @@ -574,15 +574,15 @@ impl Enigo {
if direction == Direction::Press || direction == Direction::Click {
let event = unsafe {
AppKit::NSEvent::otherEventWithType_location_modifierFlags_timestamp_windowNumber_context_subtype_data1_data2(
AppKit::NSEventTypeSystemDefined,
AppKit::NSEventTypeSystemDefined, // 14
NSPoint::ZERO,
0xa00, // NSEventModifierFlagCapsLock and NSEventModifierFlagOption
0.0,
0,
None,
8,
(code << 16) | (0xa << 8),
0
0 // this is -1 in all examples but due to the type, we can't use negative numbers
)
};

Expand All @@ -596,15 +596,15 @@ impl Enigo {
if direction == Direction::Release || direction == Direction::Click {
let event = unsafe {
AppKit::NSEvent::otherEventWithType_location_modifierFlags_timestamp_windowNumber_context_subtype_data1_data2(
AppKit::NSEventTypeSystemDefined,
AppKit::NSEventTypeSystemDefined, // 14
NSPoint::ZERO,
0xb00, // NSEventModifierFlagCapsLock and NSEventModifierFlagOption
0.0,
0,
None,
8,
(code << 16) | (0xb << 8),
0
0 // this is -1 in all examples but due to the type, we can't use negative numbers
)
};

Expand Down

0 comments on commit 2d3cb88

Please sign in to comment.