Date: Mon, 30 Mar 1998 17:39:25 +0300 (IDT) From: Eli Zaretskii To: HackerOC3 cc: djgpp AT delorie DOT com Subject: Re: Get_Scan_Code In-Reply-To: <1998033001563000.UAA06101@ladder01.news.aol.com> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Precedence: bulk On 30 Mar 1998, HackerOC3 wrote: > does anyone have code to get a scan code? I have this microsoft c code: This is functionally equivalent to the following: #include unsigned char Get_Scan_Code (void) { if (!bioskey (1)) return 0; return bioskey (0); } Two notes about the original code: 1) It doesn't test the shift status, so you cannot distinguish between 'a' and 'A'. 2) In general, I'd advise to make the function return an int, not an unsigned char (it's a long story).