daily pastebin goal
69%
SHARE
TWEET

Untitled

a guest Jul 11th, 2018 55 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. void KeyDown (UINT Key) {
  2.    INPUT Input;
  3.    ZeroMemory(&Input, sizeof(Input));
  4.    Input.type = INPUT_KEYBOARD; // keyboard
  5.    Input.ki.wVk =(WORD) Key; // Virtual Key
  6.    Input.ki.dwFlags = 0;
  7.    
  8.    SendInput(1, &Input, sizeof(INPUT));
  9. }
  10.  
  11. void KeyUp (UINT Key) {
  12.    INPUT Input;
  13.    ZeroMemory(&Input, sizeof(Input));
  14.    Input.type = INPUT_KEYBOARD; // keyboard
  15.    Input.ki.wVk =(WORD) Key; // Virtual Key
  16.    Input.ki.dwFlags = KEYEVENTF_KEYUP;
  17.    
  18.    SendInput(1, &Input, sizeof(INPUT));
  19. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top