🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.os.msdos.programmer
Article #80

Re: Keyboard type?

#80
From: Stan Brown
Date: Sun, 01 Nov 1992 22:41
34 lines
2183 bytes
In article <gay.720562144@sfu.ca> gay@beaufort.sfu.ca (Ian D. Gay) writes:
>What is the best software method of determining the keyboard type 
>(enhanced / 84 key ... others?) on a DOS system?

Please read the FAQ list before posting questions: that's why it's
there.  In this case, your question is answered at Q308:
----------------------------------------------------------------------
Q308. How can my program tell what kind of keyboard is on the system?

    Ralf Brown's Interrupt List includes MEMORY.LST, a detailed
    breakdown by Robin Walker of the contents of the BIOS system block
    that starts at 0040:0000.  Bit 4 of byte 0040:0096 is "1=enhanced
    keyboard installed".

    This code is tested under MSC 5.0 and BC++ 2.0:
        char far *kbd_stat_byte3 = (char far *)0x00400096UL;
        if (0x10 & *kbd_stat_byte3)
            /* 101- or 102-key keyboard is installed */

    {PC Magazine}'s 15 Jan 1991 issue suggests on page 412 that "for
    some clones [the above test] is not foolproof".  If you use this
    method in your program you should provide the user some way to
    override this test, or at least some way to tell your program to
    assume a non-enhanced keyboard.  The {PC Magazine} article suggests
    a different approach to determining the type of keyboard.
----------------------------------------------------------------------
If the FAQ list has expired at your system, you are welcome to email me
    >>> with a valid reply-to address <<<
and I'll send instructions on retrieving FAQ lists.
-- 
Stan Brown, Oak Road Systems                      brown@Ncoast.ORG
Cleveland, Ohio, USA
"Little minds triumph over the errors of men of genius, as the owl
rejoices at an eclipse of the sun."                 --Chamfort
Technical Details
Message-ID: <Bx271z.3yv@NCoast.ORG>
Path: arc1-ca.pugleaf.net!sparky!uunet!cs.utexas.edu!sun-barr!ames!agate!usenet.ins.cwru.edu!ncoast!brown
References: <gay.720562144@sfu.ca>

Show Full Headers
Complete Article Headers
Newsgroups: comp.os.msdos.programmer
Path: arc1-ca.pugleaf.net!sparky!uunet!cs.utexas.edu!sun-barr!ames!agate!usenet.ins.cwru.edu!ncoast!brown
From: brown@NCoast.ORG (Stan Brown)
Subject: Re: Keyboard type?
Organization: Oak Road Systems, Cleveland Ohio USA
Date: Sun, 1 Nov 1992 22:41:57 GMT
Message-ID: <Bx271z.3yv@NCoast.ORG>
Keywords: keyboard
References: <gay.720562144@sfu.ca>
Lines: 34