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: 2 additions & 0 deletions src/platform/macos/tap.rs
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,7 @@ const CGEVENT_FLAG_ALT_RIGHT: u64 = 0x00080040;
const CGEVENT_FLAG_META_LEFT: u64 = 0x00100008;
const CGEVENT_FLAG_META_RIGHT: u64 = 0x00100010;
const CGEVENT_FLAG_CAPS_LOCK: u64 = 0x00010000;
const CGEVENT_FLAG_FUNCTION: u64 = 0x800000; // kCGEventFlagMaskSecondaryFn — macOS Fn

/// Heap-allocated context pointed to by the CGEventTap's `user_info`.
/// Lives for the full lifetime of the tap. Freed in [`ShutdownGuard::drop`]
Expand Down Expand Up @@ -373,6 +374,7 @@ fn flag_bit_for_key(key: Key) -> u64 {
Key::MetaLeft => CGEVENT_FLAG_META_LEFT,
Key::MetaRight => CGEVENT_FLAG_META_RIGHT,
Key::CapsLock => CGEVENT_FLAG_CAPS_LOCK,
Key::Function => CGEVENT_FLAG_FUNCTION,
_ => 0,
}
}