DucK196

Untitled

Jun 23rd, 2018
107
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.35 KB | None | 0 0
  1. #include <iostream>
  2. #include <iomanip>
  3. #include <Windows.h>
  4.  
  5. using std::cout;
  6. using std::endl;
  7.  
  8. int main()
  9. {
  10.     while(!GetAsyncKeyState(VK_F8))
  11.     {
  12.         for(int i=0x01; i<0xFE; i++)
  13.         {
  14.             if(GetAsyncKeyState(i))
  15.             {
  16.             cout << "Key pressed: 0x" << std::setw(2) << std::setfill('0') << std::hex << i << endl;
  17.             }
  18.             Sleep(1);
  19.         }
  20.     }
  21.     return 0;
  22. }
Advertisement
Add Comment
Please, Sign In to add comment