Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!decvax!ittatc!dcdwest!sdcsvax!caip!seismo!ut-sally!nather From: nather@ut-sally.UUCP (Ed Nather) Newsgroups: net.micro.pc Subject: Re: READING PC/XT KEYPAD Message-ID: <5059@ut-sally.UUCP> Date: Tue, 3-Jun-86 10:17:22 EDT Article-I.D.: ut-sally.5059 Posted: Tue Jun 3 10:17:22 1986 Date-Received: Wed, 4-Jun-86 17:14:44 EDT References: <728@tekcbi.UUCP> <868@cyb-eng.UUCP> Distribution: na Organization: U. Texas CS Dept., Austin, Texas Lines: 17 In article <868@cyb-eng.UUCP>, bc@cyb-eng.UUCP (Bill Crews) writes: > DOS calls stick to ASCII or "extended ASCII". To get to all keys, you must > use BIOS and deal with the scan codes. Not so. Read in a keyboard character using, say, "c = fgetc(stdin)" or whatever, then test for "c == NULL". If it IS NULL, then bring in the character following, which tells you which "extended code" keystroke was done. The IBM manual tells you the mapping between these "NULL- escaped" codes and the ASCII character set, but their chart is thoroughly confusing and I couldn't figure it out; I wrote a small program to print out this "second code" when a keypad or function key was pressed. Works like a champ. And, look ma! No bios calls! -- Ed Nather Astronomy Dept, U of Texas @ Austin {allegra,ihnp4}!{noao,ut-sally}!utastro!nather nather@astro.AS.UTEXAS.EDU