Last active
July 13, 2021 18:18
-
-
Save landgrafhomyak/01d51b25955eb7560a8bfa351fd3d52d to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
This macro allows to use CapsLock instead of Space clicker. | |
Recomends to set CaplsLock disabler to Shift. | |
*/ | |
#include <windows.h> | |
void main(void) | |
{ | |
INPUT ip[2] = { | |
{ | |
.type = INPUT_KEYBOARD, | |
.ki.wScan = 0, | |
.ki.time = 0, | |
.ki.dwExtraInfo = 0, | |
.ki.wVk = VK_SPACE, | |
.ki.dwFlags = 0 | |
} | |
}; | |
ip[1] = ip[0]; | |
ip[1].ki.dwFlags = KEYEVENTF_KEYUP; | |
while (1) | |
{ | |
if (GetKeyState(VK_CAPITAL) != 0) | |
{ | |
SendInput(2, ip, sizeof(INPUT)); | |
} | |
Sleep(50); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment