| 2554 | } |
| 2555 | |
| 2556 | void QKeyMapper_Worker::sendMouseClick(V_MOUSECODE vmousecode, int keyupdown) |
| 2557 | { |
| 2558 | INPUT mouse_input = { 0 }; |
| 2559 | mouse_input.type = INPUT_MOUSE; |
| 2560 | mouse_input.mi.dx = 0; |
| 2561 | mouse_input.mi.dy = 0; |
| 2562 | mouse_input.mi.mouseData = 0; |
| 2563 | mouse_input.mi.time = 0; |
| 2564 | mouse_input.mi.dwExtraInfo = VIRTUAL_RESEND_REALKEY; |
| 2565 | if (KEY_DOWN == keyupdown) { |
| 2566 | mouse_input.mi.dwFlags = vmousecode.MouseDownCode; |
| 2567 | } |
| 2568 | else { |
| 2569 | mouse_input.mi.dwFlags = vmousecode.MouseUpCode; |
| 2570 | } |
| 2571 | UINT uSent = SendInput(1, &mouse_input, sizeof(INPUT)); |
| 2572 | if (uSent != 1) { |
| 2573 | #ifdef DEBUG_LOGOUT_ON |
| 2574 | qDebug("sendMouseClick(): SendInput failed: 0x%X\n", HRESULT_FROM_WIN32(GetLastError())); |
| 2575 | #endif |
| 2576 | } |
| 2577 | } |
| 2578 | |
| 2579 | void QKeyMapper_Worker::sendMouseMove(int delta_x, int delta_y) |
| 2580 | { |
nothing calls this directly
no outgoing calls
no test coverage detected