Keyboard: Difference between revisions
(Created page with "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 now be rema...") |
No edit summary |
||
(7 intermediate revisions by 2 users not shown) | |||
Line 1: | Line 1: | ||
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 | 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==== | ====Comments and Examples==== | ||
The Keyboard specification allows you to customize the keyboard to your needs. A four-digit keyboard [[ | 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: | 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 | 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. | 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]] ): | |||
{| border="1" align="center" | |||
|- | |||
!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 | |||
|} | |||
====Syntax==== | ====Syntax==== | ||
[[Image:Keyboard.png]] | [[Image:Keyboard.png|550px]] | ||
====Start-up Default==== | ====Start-up Default==== | ||
Line 20: | Line 58: | ||
====Technical Considerations==== | ====Technical Considerations==== | ||
:1.) You can use as many KEYBOARD specifications as you wish in the BRConfig.sys file | :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. | :2.) KEYBOARD specifications are portable because they use a set of scancodes from within Business Rules. | ||
Line 29: | Line 67: | ||
00030 GOTO 10 | 00030 GOTO 10 | ||
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. | 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'''. | If you want to remap CTRL-A, the scan code for '''CTRL-A''' is '''01'''. |
Latest revision as of 16:04, 28 July 2015
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 |
Syntax
Start-up Default
Use no keyboard translations.
Parameters
"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.