|Home Barcode Mill Barcode Fonts How to order Email us|
Altek Instruments manufacture a device to enable computers to be controlled automatically by a pre written script. We call it The Mule. The Mule is used for a variety of processing and control purposes and for auto entering data into software applications. The Mule is flexible because it works by exact emulation of a human typing at a keyboard. If you can do the job from a keyboard then you can automate it with The Mule.
To make control of The Mule easy there is a free application - Dispatcher. The Dispatcher has a built in scripting language called Bray. In order to emulate the Non ASCII keys like the Function Keys it is often necessary to enter scancodes into a Bray Script
In the past it was necessary to look up each key code in a scancode table. Then work out and append the appropriate release code and string it all together. This was time consuming and prone to error. By using the Keyboard Emulator you can see in real time the scancodes a real keyboard would produce.
The output from the Keyboard Emulator matches the syntax of Bray.
You can experiment with keystrokes and key sequences and when satisfied cut and paste the scancode
values straight into a Bray script.
How to use it
Start by clicking the reset button. Some computers power up with Numlock On others with Numlock Off (this is usually determined by the computer bios configuration). The Numlock state may be important in your application so both alternatives are provided.
Click a key once to depress it. The key changes color to show it is down. The scancode for the key-down action is printed in the text box.
Click the key a second time. The key changes back to its original color and a second line of data appears in the textbox showing the scancode for the key-up action.
The emulator produces scancodes and behaves exactly as a real keyboard. It knows which keys are down
and reacts accordingly.
To demonstrate press and release the Pause/Break key. Now depress a single Control key and
repeat the Pause/Break key. Notice the scancode sequence is different. Now try the effect if both Control keys
are down. This time the scancode sequence is as if neither control key is depressed. This is exactly what
happens with a real keyboard.
The emulator follows the Keyboard Scan Code Specification Revision 1.3a published March 16 2000 by Microsoft Corp. It implements Scan Code Set 2 emulation. Scan Code Set 2 is the current standard for PC compatible computers. It is compatible with ALL current operating systems including DOS, Windows and Unix style OSs like Linux and FreeBSD. Early model computers may have used other scancode sets but they are now old and can be considered obsolete.
Confusion can be caused by some web sites publishing tables of scancodes which appear to have different values to the ones we publish. This is because the computer translates the scancodes coming from the keyboard into a set of different values to be used internally. The translated scancodes are never used by The Mule but are of most interest to computer programmers. The confusion is compounded by some referring to the already translated scancodes as raw scancodes. To be clear: the scancodes produced by this emulator are identical to the scancodes produced by the keyboard hardware. They do not (usually at least) have the same values as the scancodes used when programming low level OS functions and apps.
Keynumbers are used to identify specific keys unambiguously. It is not sufficient to refer to a key by the character printed on it (The keycap). Different countries may use alternative keycap printing but the scancode remains the same. In other words the scancode is tied to a specific keynumber. For example the Q key on English keyboards produces the scancode (hex) 15. On French keyboards the same position is occupied by the 'A' key but the scancode remains 15. It is the computer keyboard driver which controls the interpretation of the scancode. On English computers scancode 15 is mapped to the 'Q' characer on French computers to 'A'. Most of the keynumbers we use for the Keyboard Emulator are those detailed in the specification. However keynumbers for the three special Microsoft inspired keys and the power-sleep-wake keys are not stated in the specification. We have used keynumbers 127 thru 132 for these keys. (To avoid any ambiguity if you know of a source already using different numbers for these keys please report it and we will make changes to fall in line)
For normal use keyboards often have two keys pressed at the same time. Sometimes three keys down at the same time is valid. Four or more keys down at the same time is always an invalid combination. Invalid key combinations produce varying output from real keyboards depending on the manufacturer. The Keyboard Emulator produces valid scancodes for all valid key combinations. Emulating invalid key combinations will often produce identical results to real keyboard hardware but of course this cannot be guaranteed. Users of The Mule hardware are unlikely to need auto repeating keys so no attempt has been made to emulate the typematic (auto repeat) behaviour of a real keyboard.
The emulator output is directed to a Text Box providing the ability to cut and paste to other applications.
Each line in the Text Box consists of a scancode sequence for a key-down or key-up action. The scancode sequence is in ASCII hex format. Each pair of hex characters represents one scancode byte sent from the keyboard. Following the scancode sequence is a human readable comment providing additional information. Comments are always preceded by a hash character.
To create the Keyboard it is necessary to load many small images. The browser has a limit to the number of channels it has open at any one time so although the total amount of data is not great it takes time to down load them all. Second and subsequent viewing of the page will be speeded if you allow your browser to cache images. I am looking at ways to improve speed- your suggestions are welcome.
|Top Home||© Lee Allen,2018|