MCPcopy Create free account
hub / github.com/Zalafina/QKeyMapper / postVirtualKeyCode

Method postVirtualKeyCode

QKeyMapper/qkeymapper_worker.cpp:1162–1186  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1160}
1161
1162void QKeyMapper_Worker::postVirtualKeyCode(HWND hwnd, uint keycode, int keyupdown)
1163{
1164 if (keyupdown == KEY_DOWN) {
1165 SendMessageTimeout(
1166 hwnd,
1167 WM_KEYDOWN,
1168 keycode,
1169 0,
1170 SMTO_ABORTIFHUNG | SMTO_BLOCK | SMTO_ERRORONEXIT,
1171 SENDMESSAGE_TIMEOUT,
1172 nullptr
1173 );
1174 }
1175 else {
1176 SendMessageTimeout(
1177 hwnd,
1178 WM_KEYUP,
1179 keycode,
1180 0,
1181 SMTO_ABORTIFHUNG | SMTO_BLOCK | SMTO_ERRORONEXIT,
1182 SENDMESSAGE_TIMEOUT,
1183 nullptr
1184 );
1185 }
1186}
1187
1188void QKeyMapper_Worker::sendUnicodeChar(wchar_t aChar)
1189{

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected