From ce45cd1ca1932ba95d0075d2c7f9ff95f20af6a7 Mon Sep 17 00:00:00 2001 From: Federico Terzi Date: Mon, 16 Sep 2019 14:47:26 +0200 Subject: [PATCH] Change trigger event on Windows to KEY_DOWN --- native/libwinbridge/bridge.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/native/libwinbridge/bridge.cpp b/native/libwinbridge/bridge.cpp index 1bf3ceb..b6d577c 100644 --- a/native/libwinbridge/bridge.cpp +++ b/native/libwinbridge/bridge.cpp @@ -204,8 +204,8 @@ LRESULT CALLBACK window_procedure(HWND window, unsigned int msg, WPARAM wp, LPAR // Convert the input data RAWINPUT* raw = reinterpret_cast(lpb.data()); - // Make sure it's a keyboard type event, relative to a key release. - if (raw->header.dwType == RIM_TYPEKEYBOARD && raw->data.keyboard.Message == WM_KEYUP) + // Make sure it's a keyboard type event, relative to a key press. + if (raw->header.dwType == RIM_TYPEKEYBOARD && raw->data.keyboard.Message == WM_KEYDOWN) { DWORD currentTick = GetTickCount();