EGL - Keyboard class function implementation files Key.inc

xiaoxiao2021-03-06  66

/ * Key.inc * /

INT getKey () {INT Character, ext_char = 0; IF ((Character = getch ())! = 0) Return (character); else ext_char = getCh (); return (ext_char * 100 character);} int GetStatusKey INT cmd) {char far * statuskey = (char far *) 0x00000417; Return (* statuskey & cmd)! = 0? 1: 0);} int kbhit () {int head, end; head = peek (0x40,0x1a) End = peek (0x40, 0x1c); return (head == end? 0: 1);} void clearkeybuffer (void) {int head, end; head = peek (0x40, 0x1a); Poke (0x40, 0x1c, head }

转载请注明原文地址:https://www.9cbs.com/read-88732.html

New Post(0)