Home | Info | Community | Development | myReactOS | Contact Us
Definition at line 320 of file tncon.cpp.
Referenced by TScroller::ScrollBack().
{ HANDLE hConsole = GetStdHandle(STD_INPUT_HANDLE); INPUT_RECORD InputRecord; BOOL done = FALSE; while (!done) { DWORD dwInput; WaitForSingleObject( hConsole, INFINITE ); if (!ReadConsoleInput(hConsole, &InputRecord, 1, &dwInput)){ done = TRUE; continue; } if (InputRecord.EventType == KEY_EVENT && InputRecord.Event.KeyEvent.bKeyDown ) { // Why not just return the key code? (Paul Brannan 12/5/98) return InputRecord.Event.KeyEvent.wVirtualKeyCode; } else if(InputRecord.EventType == MOUSE_EVENT) { if(!InputRecord.Event.MouseEvent.dwEventFlags) { // Put the mouse's X and Y coords back into the input buffer WriteConsoleInput(hConsole, &InputRecord, 1, &dwInput); return SC_MOUSE; } } } return SC_ESC; }