From BR Wiki
Jump to navigation Jump to search

The Keyboard BRConfig.sys specification instructs the system to generate a sequence of key actions each time a particular key is pressed. The ESC key may also be remapped with the Keyboard specification.

Keyboard can also be set using the Config command, or from within the program using the execute statement.

Comments and Examples

The Keyboard specification allows you to customize the keyboard to your needs. A four-digit keyboard scancode/character value ("aaaa," "bbbb," etc.) represents each key. Pressing the key represented by "aaaa" generates the sequence indicated as "bbbbccccdddd..."

For example, if the following Keyboard specification is included in BRConfig.sys, pressing the F7 key will generate the seven letters REPLACE:

KEYBOARD 0700,005200450050004C004100430045

You can also add Enter on the end by adding 000D; this eight letter version allows you to execute the REPLACE command with a single keystroke. This same technique (keyboard macros) can be used for any frequently used command.

Here are a few of the Scan codes (for a complete list see Scancode ):

Key Scan Code
Tab 09
Shift+Tab 07
Down Arrow 0A
Up Arrow 0B
Left Arrow 0E
Right Arrow 0C
F7 0700
Shift+F7 1100
Alt+Down Arrow E300


Start-up Default

Use no keyboard translations.


"Scancode" is a four-digit keyboard character value which represents the key to be pressed. When the key represented by the first scan code in the diagram is pressed, Business Rules! simulates the pressing of all the keys indicated by the second set of scancodes.

Technical Considerations

1.) You can use as many KEYBOARD specifications as you wish in the BRConfig.sys file.
2.) KEYBOARD specifications are portable because they use a set of scancodes from within Business Rules.

To determine the Business Rules standardized scan codes, run the following program:

00010 LET X$=KSTAT$(1)
00020 PRINT UNHEX$(X$)
00030 GOTO 10

Each time you press a key, the scancode for that key is displayed. This program can be used to find the keyboard scan code for every key or key combination except CTRL-A, since pressing CTRL-A pauses the execution of the program.

If you want to remap CTRL-A, the scan code for CTRL-A is 01.

KEYBOARD statements may now be executed by the CONFIG command to accomplish dynamic keyboard remapping. Also the keyword CLEAR may be used to remove specific or all previous specifications.

CONFIG KEYBOARD CLEAR		clears all prior keyboard statements
CONFIG KEYBOARD 0100 CLEAR	clears the definition for scancode 0100

This significantly enhances the capabilities of BR. For example, you can temporarily make a program uninterruptable.

Also, scancodes that were previously required to be four hex digits long no longer require leading zeroes, for example:

CON KEY  0A 6A756D70   ! ^J -> "jump"

Note that CONFIG abbreviations are allowed in commands, but not in actual BRCONFIG.SYS file statements.