diff --git a/SnapKey.cpp b/SnapKey.cpp index 675e5df..43872ce 100644 --- a/SnapKey.cpp +++ b/SnapKey.cpp @@ -6,7 +6,6 @@ #include #include #include - #include using namespace std; @@ -186,7 +185,7 @@ void SendKey(int targetKey, bool keyDown) { INPUT input = {0}; input.ki.wVk = targetKey; - input.ki.wScan = MapVirtualKey((UINT) char(targetKey), 0); + input.ki.wScan = MapVirtualKey(targetKey, 0); input.type = INPUT_KEYBOARD; DWORD flags = KEYEVENTF_SCANCODE;