//===========================================================================// // File: PCkeybd.cc // // Project: MUNGA Brick: Platform-specific IO // // Contents: PC keyboard interface // //---------------------------------------------------------------------------// // Date Who Modification // // -------- --- -----------------------------------------------------------// // 01/19/95 CPB Initial coding. // //---------------------------------------------------------------------------// // Copyright (C) 1995, Virtual World Entertainment, Inc. All rights reserved // // PROPRIETARY and CONFIDENTIAL // //===========================================================================// #include #pragma hdrstop #include #include int PC_Keyboard_Read(void) { int c; if (!kbhit()) // if keyboard has not been hit, return zero { return(0); } else { c = getch(); // keyboard was hit, get code if (c == 0) // zero: next character is extended code { c = getch() | 0x0100; // flag as extended } return(c); // return the value } }