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

Method startInterception

QKeyMapper/interception_worker.cpp:391–415  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

389}
390
391void Interception_Worker::startInterception()
392{
393 if (s_InterceptionContext == Q_NULLPTR) {
394 return;
395 }
396
397 QKeyMapper_Worker::pressedMultiKeyboardVKeyCodeList.clear();
398 for (int i = 0; i < INTERCEPTION_MAX_KEYBOARD; ++i) {
399 QKeyMapper_Worker::pressedMultiKeyboardVKeyCodeList.append(QList<quint8>());
400 }
401 s_InterceptStart = true;
402
403#ifdef QT_DEBUG
404 if (!IsDebuggerPresent()) {
405 interception_set_filter(s_InterceptionContext, interception_is_keyboard, INTERCEPTION_FILTER_KEY_ALL);
406 interception_set_filter(s_InterceptionContext, interception_is_mouse, INTERCEPTION_FILTER_MOUSE_ALL);
407 }
408#else
409 interception_set_filter(s_InterceptionContext, interception_is_keyboard, INTERCEPTION_FILTER_KEY_ALL);
410 interception_set_filter(s_InterceptionContext, interception_is_mouse, INTERCEPTION_FILTER_MOUSE_ALL);
411#endif
412#ifdef DEBUG_LOGOUT_ON
413 qDebug().nospace() << "[startInterception] Start Keyboard & Mouse Interception.";
414#endif
415}
416
417void Interception_Worker::stopInterception()
418{

Callers

nothing calls this directly

Calls 1

clearMethod · 0.45

Tested by

no test coverage detected