From c62b81f2b9d40af5361529c06043d509b54a4269 Mon Sep 17 00:00:00 2001 From: omigamedev Date: Fri, 18 Jan 2019 23:51:06 +0100 Subject: [PATCH] fix key press on windows activated --- src/main.cpp | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/src/main.cpp b/src/main.cpp index f408856..9420d00 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -828,6 +828,21 @@ LRESULT CALLBACK WndProc(HWND hWnd, UINT msg, WPARAM wp, LPARAM lp) tasklist.emplace_back([=] { int active = GET_WM_ACTIVATE_STATE(wp, lp); WacomTablet::I.set_focus(active); + for (int k = 0; k < 256; k++) + { + if (App::I.keys[k]) + { + for (int i = 0; i < 256; i++) + { + if ((int)convert_key(i) == k) + { + bool down = GetKeyState(i) & 0x8000; + if (!down) + App::I.key_up((kKey)k); + } + } + } + } }); break; }