Skip to content

Commit

Permalink
Merge pull request #46 from FabianSt305/patch-1
Browse files Browse the repository at this point in the history
Release Alt key before Ctrl key (this fixes an unexpected behavior in Visual Studio Code)
  • Loading branch information
MaxGyver83 authored Nov 14, 2021
2 parents 39c73ab + f4ef60d commit ccc3d73
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -835,8 +835,8 @@ void sendChar(TCHAR key, KBDLLHOOKSTRUCT keyInfo) {
keybd_event(keyInfo.vkCode, keyInfo.scanCode, dwFlagsFromKeyInfo(keyInfo), keyInfo.dwExtraInfo);

if (altgr) sendUp(VK_RMENU, 56, true);
if (ctrl) sendUp(VK_CONTROL, 29, false);
if (alt) sendUp(VK_MENU, 56, false); // ALT
if (ctrl) sendUp(VK_CONTROL, 29, false);
if (shift) sendUp(VK_SHIFT, 42, false);
}
}
Expand Down

0 comments on commit ccc3d73

Please sign in to comment.