extra logging, polling keys after modifier key fake

This commit is contained in:
Nick Bolton 2014-03-17 19:02:13 +00:00
parent 729bbeab01
commit 0563eeb467
1 changed files with 9 additions and 1 deletions

View File

@ -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;