Skip to content

Commit

Permalink
Merge pull request #59 from minteeaa/main
Browse files Browse the repository at this point in the history
hotfix for scancode casting
  • Loading branch information
cafali authored Aug 15, 2024
2 parents 5092156 + 4cbf44a commit b36ee88
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions SnapKey.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
#include <sstream>
#include <string>
#include <unordered_map>

#include <regex>

using namespace std;
Expand Down Expand Up @@ -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;
Expand Down

0 comments on commit b36ee88

Please sign in to comment.