Path: utzoo!attcan!utgpu!jarvis.csri.toronto.edu!mailrus!shadooby!samsung!zaphod.mps.ohio-state.edu!tut.cis.ohio-state.edu!sppy00!wjc From: wjc@sppy00.UUCP (William J. Curry) Newsgroups: comp.sys.ibm.pc Subject: Re: Extended (101/102 key) Keyboards Message-ID: <621@sppy00.UUCP> Date: 1 Dec 89 22:04:45 GMT Reply-To: wjc@sppy00.UUCP (William J. Curry) Distribution: na Organization: Online Computer Library Center, Dublin, Ohio. Lines: 42 In article <197@sdscal.UUCP> keith@sdscal.UUCP (Keith Jones) asks: >Does anyone out there in netland know of a small routine to determine >whether the keyboard connected to any given machine is extended or not? Here's one that I have found to work on IBM's, Wyse's, NCR's, Zenith's, Compaq's, etc.: #define TRUE 1 #define FALSE 0 int CheckForEnhanced(void) { unsigned char far *p; p = (unsigned char far *) 0x00400096; if (*p & 0x10) /* is it an enhanced keyboard? */ return(TRUE); /* yep, let caller know */ return(FALSE); /* must not be enhanced */ } int main(void) { if (CheckForEnhanced()) printf("Enhanced!\n"); else printf("Not Enhanced!\n"); return(0); } Hope it helps! -Bill -- William Curry UUCP:wjc@sppy00.UUCP or {att|pyramid|killer}!osu-cis!sppy00!wjc Snail: 6565 Frantz Road Dublin, Ohio 43017-0702 614-761-5031 == "Of course the standard disclaimer applies, why wouldn't it?" ==