home *** CD-ROM | disk | FTP | other *** search
- KeyPress, By Tony McNamara. Copywrite 1991.
- Version 3.0
-
- <<<<<<<<<<<<<<<<<<< LEGAL DISTRIBUTION STUFF >>>>>>>>>>>>>>>>>>>
- This file may be distributed only according to the following conditions:
- 1 - This documentation must accompany the file.
- 2 - Neither the executable nor the documentation may be modified.
- 3 - No charge may be made for this software.
-
- I am going to spell out Item 3 here, to give my product a slime-resistant
- coating. This program may not be distributed as part of a set with which a
- cost is associated. If this program is distributed on a diskette, no charge
- may be made for that diskette. If this program is distributed as part of a
- set of programs on a diskette, no charge may be made for ANY of the programs
- on that diskette. The only person authorized to charge for the program or to
- modify the program or the documentation is the program's author.
-
- The one exception to the no charge rule is: on-line services such as
- CompuServe and Genie do not have to modify their policies for this software.
- As long as it has been uploaded with this file and the executable, and is
- downloaded as a packet too (i.e. in ZIP or similar format), the cost of
- connect-time is to be considered not a charge for this software but rather an
- opportunity cost similar to that of the long-distance phone call when
- ordering a product.
-
- <<<<<<<<<<<<<<<<<<<<<< END of LEGAL STUFF >>>>>>>>>>>>>>>>>>>>>>
-
- KeyPress.COM, By Tony McNamara.
-
- Purpose:
- KeyPress is designed to "stuff" the keyboard buffer. Unlike other
- programs, however, KeyPress is not a TSR and does not hook any interrupt
- vectors to do this. The result is that KeyPress does not require any memory
- and does not pose a compatibility problem for any other programs. The
- downside is that KeyPress can only stuff in 16 characters before running out
- of space in the keyboard buffer.
-
- Usage:
- KeyPress should be used from a batch file or script such as those in the
- Norton Commander User Menu section. This is because KeyPress doesn't waste
- any time stuffing the keyboard buffer, so you can't have the stuffings saved
- if you use it at the DOS prompt - DOS would read the buffer itself were it
- not already reading from a batch or script file.
-
-
- Parameters:
- <string> : ASCII to stuff into the keyboard buffer
- // : Stuff a "/" (slash) to the buffer. This is needed
- because "/" is used to delimit special codes.
- /E : Stuff an <Escape>.
- /R : Stuff <Enter>.
- /F# : Stuff Function-Key #.
- /S# : Stuff Shifted-Function-Key #.
- /A# : Stuff Alt-Function-Key #.
- /C# : Stuff Control-Function-Key #.
- /Cx : Stuff Control-x.
- /N### : Stuff ASCII character ### (000-255, all 3 digits needed.)
- /Kx : Stuff a Kursor Keypad character (0-9, or .+-*/)
- /? : Command summary - for quick usage reminders.
-
- ----------------------------------------------------------------------------
- Function Key Numbers:
- For parameters denoted with "#", # is a single digit. F10 is
- represented by "0". F11 and F12 are not supported.
-
- Control Characters:
- Control characters generally can not be entered at the DOS
- prompt, because they are acted upon. This allows those characters to
- be stuffed anyhow. This is not the place for a full explanation of
- their functions, but I'll list a few below. These are the characters
- from 1 to 1Ah or 26d, known also as "Control-A" to "Control-Z", and
- written as ^A to ^Z.
-
- Note: The following are not the keys they look like. For example,
- ^H is not the <BackSpace> key. Rather, it is the ASCII
- representation of that function. Some programs may follow the
- ASCII code, some may not. Terminal emulators generally will.
-
- ^G, 07h, is the Bell
- ^H, 08h, is "backspace".
- ^I, 09h, is TAB
- ^L, 0Ch, is Form Feed. This usually ejects a page from the printer.
- ^M, 0Dh, is "Carriage Return". Use /E instead whenever possible
- because /E puts in the whole scan code, not just ASCII.
- ^Z, 1Ah, is <End-Of-File> and "Substitute".
-
-
- ASCII Characters (/Nxxx):
- The /N parameter is to allow you easier access to non-printable
- characters, but work the same as the Control Characters. For example,
- /Ca and /N001 would stuff the same value, and so would /Cz and /N026.
-
- Kursor Keypad Characters (/Kx):
- The /K parameter stuffs the cursor control keys found on the
- numeric keypad. It does this in 101-key mode. (i.e. 00, not E0)
- The values stuffed are the extended scan codes for the keys, not
- their ASCII values (although I stuff the ASCII value if the key
- always produces one). The result is that /K8 stuffs the equivelent
- of hitting the up-arrow key, /K. hits <Delete>, and /K1 is the
- <End> key. The grey keys (numeric +, -, *, and /) are duplicated
- because these keys have special functions in some programs, such as
- The Norton Commander and Brief.
-
- ----------------------------------------------------------------------------
- Examples:
- If you had a mail program you wanted to automate, which required your
- password before it would let you into the program, and then required <F10>
- to pull down the menu and the down arrow twice plus <Enter> to Receive your
- messages, you could automate this with the following batch file:
- KeyPress password/r/f0/k2/k2/r
- mail_prg
-
-
-
- ----------------------------------------------------------------------------
- Contacting the author:
-
- If you have problems or suggested enhancements, or just are
- feeling generous and wish to send me a gratuity <grin>, you can reach
- me at:
- CompuServe: 72477,2504
- MCI Mail: 381-9188 - TMCNAMARA
-
- <END>
-
-
-
-