#include int _tmain(int argc, _TCHAR* argv[]) { while(true) { // Go through all 256 possible key inputs for(int key = 0; key < 256; ++key) { // Try to remove '& 1' from the if statement, see what happens. if(GetAsyncKeyState(key) & 1) { _tprintf(_T("%c "), (TCHAR)key); break; } } // You can do more fancy things with checking indivdual keys like this, if(GetAsyncKeyState(VK_ESCAPE) & 1) // VK_ESCAPE = 0x1B = 27 { return 1; // quit the application } } return 0; }