diff --git a/meshcore/KVM/Linux/linux_events.c b/meshcore/KVM/Linux/linux_events.c index dc9dcdf..3d6f247 100644 --- a/meshcore/KVM/Linux/linux_events.c +++ b/meshcore/KVM/Linux/linux_events.c @@ -125,6 +125,11 @@ void MouseAction(double absX, double absY, int button, short wheel, Display *dis return; } + if (button == 0x88) { + // Double click, do nothing on Linux. + return; + } + if (!x11tst_exports->XTestFakeMotionEvent(display, -1, absX, absY, CurrentTime )) { return; } if (button != 0) { diff --git a/meshcore/KVM/MacOS/mac_events.c b/meshcore/KVM/MacOS/mac_events.c index 204fec4..894baef 100644 --- a/meshcore/KVM/MacOS/mac_events.c +++ b/meshcore/KVM/MacOS/mac_events.c @@ -156,6 +156,12 @@ void MouseAction(double absX, double absY, int button, short wheel) CGEventType event; CGEventSourceRef source; + if (button == 0x88) { + // Double click, this is useful on MacOS. + // TODO + return; + } + curPos.x = absX; curPos.y = absY; diff --git a/meshcore/KVM/Windows/input.c b/meshcore/KVM/Windows/input.c index 2e9077a..5416a28 100644 --- a/meshcore/KVM/Windows/input.c +++ b/meshcore/KVM/Windows/input.c @@ -35,14 +35,21 @@ MOUSEEVENTF_MIDDLEDOWN 0x0020 MOUSEEVENTF_LEFTUP 0x0004 MOUSEEVENTF_RIGHTUP 0x0010 MOUSEEVENTF_MIDDLEUP 0x0040 +MOUSEEVENTF_DOUBLECLK 0x0088 */ void MouseAction(double absX, double absY, int button, short wheel) { INPUT mouse; - mouse.type = INPUT_MOUSE; - mouse.mi.dx = (long) absX; - mouse.mi.dy = (long) absY; + + if (button == 0x88) { + // Double click indication, no nothing on windows. + return; + } + + mouse.type = INPUT_MOUSE; + mouse.mi.dx = (long)absX; + mouse.mi.dy = (long)absY; mouse.mi.mouseData = wheel; mouse.mi.dwFlags = MOUSEEVENTF_ABSOLUTE | MOUSEEVENTF_VIRTUALDESK | MOUSEEVENTF_MOVE | button; if (wheel) mouse.mi.dwFlags |= MOUSEEVENTF_WHEEL;