mirror of
https://github.com/debauchee/barrier.git
synced 2026-05-09 07:22:21 +08:00
extra logging, polling keys after modifier key fake
This commit is contained in:
@@ -541,11 +541,19 @@ COSXKeyState::fakeKey(const Keystroke& keystroke)
|
||||
// set the event flags for modifier keys, see: http://tinyurl.com/pxl742y
|
||||
CGEventSetFlags(ref, modifiers);
|
||||
CGEventPost(kCGHIDEventTap, ref);
|
||||
|
||||
|
||||
// HACK: add a delay if client data isn't zero
|
||||
if (keystroke.m_data.m_button.m_client) {
|
||||
ARCH->sleep(0.01);
|
||||
}
|
||||
|
||||
IKeyState::KeyButtonSet pressed;
|
||||
pollPressedKeys(pressed);
|
||||
|
||||
IKeyState::KeyButtonSet::const_iterator it;
|
||||
for (it = pressed.begin(); it != pressed.end(); ++it) {
|
||||
LOG((CLOG_DEBUG1 " pressed: button=%03x", *it));
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user