Skip to content

Commit 31c6e3f

Browse files
committed
macos: fix modifier capture
1 parent f91b6bd commit 31c6e3f

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

input-capture/src/macos.rs

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -218,6 +218,13 @@ fn get_events(
218218
let mut mods = XMods::empty();
219219
let mut mods_locked = XMods::empty();
220220
let cg_flags = ev.get_flags();
221+
if let Ok(key) = map_key(ev) {
222+
result.push(CaptureEvent::Input(Event::Keyboard(KeyboardEvent::Key {
223+
time: 0,
224+
key,
225+
state: 1,
226+
})));
227+
}
221228

222229
if cg_flags.contains(CGEventFlags::CGEventFlagShift) {
223230
mods |= XMods::ShiftMask;

0 commit comments

Comments
 (0)