Skip to content

Instantly share code, notes, and snippets.

@littletsu
Last active July 4, 2020 22:13
Show Gist options
  • Save littletsu/ac31cd6000d7547c0844a32036508dd8 to your computer and use it in GitHub Desktop.
Save littletsu/ac31cd6000d7547c0844a32036508dd8 to your computer and use it in GitHub Desktop.
Probably Working With All Programs SendInput
INPUT ip = {0};
ip.type = INPUT_KEYBOARD;
ip.ki.wScan = 0x39; // hardware scan code for key (http://www.philipstorr.id.au/pcbook/book3/scancode.htm)
ip.ki.dwFlags = KEYEVENTF_SCANCODE;
SendInput(1, &ip, sizeof(INPUT));
ip.ki.dwFlags = KEYEVENTF_SCANCODE | KEYEVENTF_KEYUP;
SendInput(1, &ip, sizeof(INPUT));
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment