stevewa@upvax.UUCP (Steve Ward) (09/04/88)
Is there any way anyone has found to tell MS-Windows 2.1 that I have a 101-key keyboard? At this time, if I try to use the cursor keypad with the numlock key on, I just get numbers. If anyone has any ideas I'd sure like to hear from you. thanks | Steve Ward Jr. | | | University of Portland (Just a lowly student!) | stevewa@upvax.UUCP | | Portland, Oregon | !tektronix!upvax!stevewa |
keith@sdscal.UUCP (Keith Jones) (11/28/89)
Hi all. I was fooling around with extended keyboards the other day, specifically with the extended bios calls and I ran into a weird problem. The problem was that I could figure out (although in perhaps an unportable fashion) whether a given computer had an extended keyboard or not by playing with INT 16 with AH = 0x11 (check extended keyboard status). This worked fine on a Wyse 386, a Samsung 286, and an IBM/PC AT all with extended keyboards. It also worked on an IBM PC with a normal keyboard, but it didn't work on an IBM PC with an extended keyboard. I also looked through the Waite Group's DOS Developer's Guide and MS-DOS Advanced Programming from Sybex but neither gave anything as far as the detection of extended keyboards goes. 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? Keith -- Keith Jones ...!calgary!spycal!sdscal!keith Stream Data Systems I don't have a signature because my pen Calgary, Alberta, Canada keeps scratching up my monitor.
wjc@sppy00.UUCP (William J. Curry) (12/02/89)
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?" ==
leonard@bucket.UUCP (Leonard Erickson) (12/05/89)
keith@sdscal.UUCP (Keith Jones) writes: >The problem was that I could figure out (although in perhaps an unportable >fashion) whether a given computer had an extended keyboard or not by playing >with INT 16 with AH = 0x11 (check extended keyboard status). This worked >fine on a Wyse 386, a Samsung 286, and an IBM/PC AT all with extended >keyboards. It also worked on an IBM PC with a normal keyboard, but it >didn't work on an IBM PC with an extended keyboard. The reason for this is quite simple. There is no such thing as an "extended keyboard on an IBM PC". The codes returned by the "extra" keys are the same as those returned by the other keys. (that is the arrows on the inverted T return the same codes as do the equivalant keys on the numeric pad) The IBM PC BIOS has no support for extended keyboards. So If your software determines that it is running on a PC or XT, it doesn't need to check for an extended keyboard. -- Leonard Erickson ...!tektronix!reed!percival!bucket!leonard CIS: [70465,203] "I'm all in favor of keeping dangerous weapons out of the hands of fools. Let's start with typewriters." -- Solomon Short