Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!sdd.hp.com!zaphod.mps.ohio-state.edu!sample.eng.ohio-state.edu!purdue!haven.umd.edu!uflorida!SORROW@MAPLE.CIRCA.UFL.EDU From: sorrow@oak.circa.ufl.edu Newsgroups: comp.lang.c++ Subject: Re: show profile Message-ID: <0094A4E6.EC6D5A80@MAPLE.CIRCA.UFL.EDU> Date: 18 Jun 91 15:20:26 GMT References: <1991Jun17.171243.579@gw.wmich.edu> Sender: news@uflorida.cis.ufl.EDU Reply-To: sorrow@oak.circa.ufl.edu Organization: University of Florida CIRCA VAX Cluster Lines: 46 Although this is not a C++ question, I'll answer anyway since I'm such a nice guy. :-) Use getch(). If it returns 0, then it is an extended key. Getch() again. This is the scan code. Make an include file with definitions for the scan codes and add these to 256 to make a final key definition. Example: /* Simple code to get key codes. If it is a "normal" key getch() will work fine. OTherwise, getch() will return 0 and you must get the next key out of the buffer. */ #ifndef __CONIO_H #include #endif #ifndef __STDIO_H #include #endif void main ( void ) { int TheKey; while (1) { if ((TheKey=getch())==0) TheKey=getch()+256; // Extended scan code printf("The key is %i\n",TheKey); } } You may wish to look at the bioskey() function also. Brian /* Brian Hook -- MS-DOS Programmer for Contract ----------------------------------------------------------------- "Seamus, that's my dog...I saw her today at the reception...sorry, sixTEEN inches....better save the women and children first...but this one goes to 11! ..anymore of that plutonium nyborg?....there can be only ONE!....like a finger pointing to the moon....ease the seat back...one day closer to death */