S.U.P.E.R. HP 200LX Archive
← Back to the catalogue

GETKEY

Version 1.11 · Chad Knudson

Download 11.4 KB

Description

GetKey is a command to use in Batch files to allow polling for any keypress of the keyboard. It was written for developing a menu system in DOS Batch (.BAT) files. Freeware.

Technical details

File
getkey11.zip
Size
11.4 KB
Format
.zip
Year
1993
Added to S.U.P.E.R.
1996-11-20
Files inside
9
Author
Chad Knudson
Path
anonftp/pub/getkey11.zip

How to install it

What to send to the palmtop saves 6.8 KB

These are the files you need. You can send them from the package contents below.

  • RUNME.BAT → A:\SOFT programa de DOS 1.6 KB
  • TESTKEYS.BAT → A:\SOFT programa de DOS 425 B
  • GETKEY.EXE → A:\SOFT programa de DOS 9.2 KB
  • PURGMENU.COM → A:\SOFT programa de DOS 913 B
  • PURGE.BAT → A:\SOFT programa de DOS 834 B

No need to put F1CONT.ASC, MENU.ASC, GETKEY.DOC, FILE_ID.DIZ: they are manuals, source code or supporting material. Read them here and save 6.8 KB on a 1 MB disk.

Steps
  1. Copy RUNME.BAT, TESTKEYS.BAT, GETKEY.EXE, PURGMENU.COM to A:\SOFT. They are DOS programs: run them from the DOS icon, or add A:\SOFT to the PATH in C:\AUTOEXEC.BAT to call them by name.

Derived from the package contents and the 200LX conventions. It installs to A: on purpose: C: is a RAM disk and every byte there is memory taken from the system.

The author's instructions German
Setup
    Operation of GetKey is quite simple. You will want to place the
    GETKEY.EXE file either in the directory that your .BAT file resides
    or in a directory in your DOS PATH statement. That's all that you
    need to do for setting up GetKey.

    Operation
    GetKey is designed for use in .BAT files.  When you call GetKey in a
    .BAT file, it will wait until the next keypress occurs and then will
    store a textual representation of that key in the DOS environment
    variable KEY.  Here are some samples of what GetKey places in KEY:

    KEY=        │ Keystroke
    F10         │ Function key F10 pressed
    A           │ Capital A pressed
    CTRL-HOME   │ CTRL and HOME keys pressed simultaneously
    ALT-X       │ ALT and X keys pressed simultaneously
    ESC         │ Escape key pressed
    ALT-F12     │ ALT and Function Key F12 pressed simultaneously
    ???         │ 5 pressed on numeric keypad when NumLock off

    As you can see, it allows for nearly any keystroke combination to be
    polled.  If GetKey doesn't recognize the keypress, it places three
    question marks in KEY.  The majority of keypresses are available to
    you to use, but there are a few that I excluded.  To make sure that
    the keypress you wish to use is valid, try it manually.  Type
    GETKEY, press the keypress in question, and type SET at the DOS
    prompt to see your current environment setting.  (A sample of how to
    do this is included in the file TESTKEY.BAT which will probably
    suffice for any testing you need to do.)

    Using GetKey in a .BAT file
    Below is a sample batch file (also included in this .ZIP is a file
    RUNME.BAT, which is a more in-depth demonstration) which
    demonstrates how you can utilize GetKey in your own batch file.

…

Literal excerpt from GETKEY.DOC, exactly as it came in the package.

Send to my palmtop

The palmtop must be waiting before you press the button, or the transfer will fail. It is the palmtop that announces it is ready, not the other way round.

First time? How to connect the palmtop, step by step →