Home Page Shadow Mule User Manual shopping cart
site currency

currency info
spacer Home spacer Barcode Mill spacer Barcode Fonts spacer How to order spacer Email us spacer

"The Shadow Mule"

Keyboard Monitoring & Analysis

Getting Started

Packing List

Quick Start

  1. Make sure the computer is switched off.
  2. Withdraw the keyboard connector from the computer.
  3. Check that your keyboard is fitted with a 5 pin DIN connector, identical to the connectors on the cable supplied with the Shadow Mule.
  4. If your keyboard is fitted with a connector having 6 small pins and a plastic peg you have Mini DIN connectors and you will need to use the adaptor cable set. If you have any other type of connector then your keyboard is not fully IBM PC compatible - contact your computer dealer for advice.
  5. Connect the cable supplied with the Shadow Mule to the keyboard socket on the computer.
  6. Connect the free end of the cable to the Shadow Mule. Use the socket marked 'Computer'.
  7. Connect your keyboard to the socket on the Shadow Mule marked 'Keyboard'.
  8. Switch the computer on and check that the keyboard works normally. The green LED light on the Shadow Mule should be illuminated and will flash slowly.
  9. The RS232 output may be connected to a second PC with the cable supplied. Alternatively the output could be connected to any other type of RS232 receiving device, although in that case you may have to provide a different type of cable with appropriate handshake connections.

The completes the basic setup procedure. The rest of this guide contains more detailed information and alternative settings.


Connector & Pinouts

The RS232 connector on the Shadow Mule is a 9 pin Female 'Dee' connector configured to make interfacing to a PC easy. The numbering is shown below.

RS232 Pinout

Device Power Source

Pin 4 on the RS232 connector may optionally be used to supply power for the attached RS232 device. Pin 4 has been chosen for this purpose to provide compatibility with the normal DTR function usually connected here. By default Pin 4 is open circuit. Refer to the Advanced Section to implement this feature.

Under Voltage Warning LED

Computer keyboard circuits are often badly regulated and this can sometimes lead to unusual conditions and give misleading errors. The Shadow Mule monitors the computer keyboard voltage continuously. If the keyboard voltage drops below a critical threshold the red 'Under Voltage' warning LED will light up. (A brief indication when the computer is powered up is normal.) If this happens you should investigate the cause. If you are powering an external RS232 device from the keyboard circuit you may need to use an additional power supply. See the Advanced Section for more information.


The RS232 data format is fixed at 8 data bits, no parity, one stop bit. The default transmission speed is 9600 baud. The baud rate can be changed by resetting the dip switches inside the Shadow Mule (see the next section).

The Shadow Mule can usually be operated without a RS232 handshake. It will automatically buffer up to 94 characters. In the unlikely event that data is lost because the buffer overflowed then a tilde (~) character is inserted into the data stream to flag it. The Shadow Mule can be operated with a RTS/CTS handshake if you need to synchronise to a slow data collector or one with a readiness duty cycle of less than 100%. The handshake scheme is very simple - the Shadow Mule simply holds off transmission if the handshake line connected to pin 7 is negated.

The handshake output (pin 8) from the Shadow Mule is asserted when it has data to send and negated otherwise. In most interface/handshake arrangements this line may be ignored.

Operating Modes

The Shadow Mule can output data in a number of different ways to suit most application requirements. The appropriate mode is selected by means of dip switches located within the Shadow Mule. To access the dip switches disconnect the Shadow Mule from all sources of power (e.g. the powered keyboard circuit) and carefully lift the top cover after removing the four retaining screws. The location of the dip switches and their numbering is shown in the figure below.

Note that the factory default setting is all off (this is the generally used configuration).

The settings for each switch are detailed in the Dip Switch Configuration tables below.

The Shadow Mule has two main modes of operation - ASCII mode and Scancode mode.


The ASCII modes provide an interpreted ASCII representation of the scancodes captured from the keyboard circuit by the Shadow Mule. The data can be output in four different ways.

ASCII Mode 1

Keystroke data is converted to and transmitted as regular ASCII characters. Non ASCII keys such as Function and Cursor keys are transmitted as 2 bytes. The first byte of these double byte codes is the NULL character ...chr$(0)... cntrl@.

ASCII Mode 2

As ASCII mode 1 but the double byte codes are filtered out (not transmitted).

ASCII Mode 3

Each ASCII character is transmitted as an ASCII hex string terminated according to the settings of dip switches 4 & 5.

ASCII Mode 4

As ASCII mode 3 but the 2 byte codes are filtered out.

Scancode Mode

The Scancode modes provide the unprocessed scancode data. Bi-directional scancodes from both the keyboard and computer are separately identified and output in a way that would allow complete and independent analysis of the keyboard/computer interaction. Scancode mode can be useful for debugging keyboard hardware and software problems. It may also be used to provide a raw data stream for special decoding and analysis equipment.

Scancode Mode 1

Unprocessed scancodes captured from the keyboard circuit are sent as ASCII hex strings. Each scancode is prefixed with a '>' if the scancode originates from the keyboard or with a '<' if the scancode is sent from the computer (press the caps lock key to see an example of the interaction process). No terminator is applied to the string.

Scancode Mode 2

As scancode mode 1 but the strings are terminated according to the dip switches 4 and 5.

Dip Switch Configuration Tables

Switch NumberSwitch NumberRS232 Baud Rate
off off * 9600
on off 19200
off on 38400
on on 1200

Switch 3
off * No RS232 handshake
on RTS/CTS handshake (Shadow Mule waits for RTS)

Switch NumberSwitch NumberString Terminator
off off* CR
on off SPACE
off on TAB
on on CR+LF

Switch NumberSwitch NumberSwitch NumberASCII Modes
off off off* ASCII Mode 1
off off on ASCII Mode 2
off on off ASCII Mode 3
off on on ASCII Mode 4

Switch NumberSwitch NumberSwitch NumberScancode Modes
on off off Scancode Mode 1
on off on Undefined
on on off Scancode Mode 2
on on on Undefined

* Default configuration

Advanced Information & Techniques

Scancodes - a brief explanation

The PC keyboard does not send ASCII codes to the computer in response to keystrokes, it sends scancodes. This is not just a matter of a simple alternative coding system. The scancode system embodies a completely different concept to ASCII encoding. Scancodes simply indicate which key has been pressed and which key has been released. For example, the shift key sends a scancode to the computer just as an alphanumeric key. It is the computer which interprets the scancodes. For example, a scancode from a shift key followed by a scancode from an alpha key may be interpreted as a capital letter. The keyboard sends a different scancode for each key so the left shift key would send a different scancode to the right shift key.

A full list of scancodes can be found on our web site.

Keyboard 'Lock' Indicator Issues

PC keyboards have three lamps indicating the current keyboard 'Lock' status. They are - Num Lock, Caps Lock and Scroll Lock. It is important to realise that the lamps are controlled by the computer - not the keyboard. The keyboard sends the same scancode for each key regardless of the state of the lock indicators. The lock indicators are simply there for the convenience of the human operator. They indicate the way the computer will process the scancodes coming from the keyboard. For example the scancode from an alpha key would be the same no matter what the status of the Caps Lock indicator.

The Shadow Mule cannot 'see' the indicators as a human can. It has to remember when the computer last changed the state of the indicator. If, for example, the Shadow Mule is inserted into a 'live' keyboard circuit it will not be able to determine the existing state of the lock indicators. Under these circumstances it will inaccurately interpret the keystrokes until it is able to re-synchronise with the indicators. This will be the next time the PC changes any of the lock indicators.

If the Shadow Mule is inserted into a 'live' keyboard circuit, or any part of the keyboard circuit is connected or disconnected while 'live', any of the keyboard 'lock' keys should be pressed a couple of times in order to resynchronise the Shadow Mule.

Important Note: Altek recommend that all equipment should be switched off before making any alterations to hardware configurations. However we realise that engineers and users often ignore this advice!

Power Management Links

The Shadow Mule can be configured to provide power to an external device connected to the RS232 port. This may be useful if a low powered device other than a PC is to receive the data. Also the Shadow Mule itself can be configured to be powered from a source other than the keyboard circuit to which it is attached. This may be useful if the Undervoltage LED indicates the PC circuit cannot sustain the extra few millivolts required by the Shadow Mule.

Link Configuration Table

Important: Not more than 1 link is permitted in Group 1. Group 2 has zero links by default.

By default Link 2 only is connected.

Group 1: Shadow Mule is powered from...

  1. External PSU (via rectifier and regulator in Shadow Mule)
  2. Direct from computer keyboard circuit

Group 2: Pin 4 of RS232 Connector connected to...

  1. +5v DC, rectified & regulated from external PSU
  2. Nominal +5v DC, direct from computer keyboard circuit
  3. Not possible
  4. Rectified but unregulated DC supply direct from external PSU

Any Problems?

Common Questions and Answers

Q Most ASCII characters are OK but a few are consistently 'wrong'.

A Outside the USA many countries have minor changes to the keyboard layout. For those countries you must have the appropriate version of "The Shadow Mule" and you must be using the correct keyboard driver. If you wish to use "The Shadow Mule" in a different country you may have to 'convert' these characters in the applications program or perhaps resort to 'scancode mode'.

Q I occasionally find an unexpected tilde (~) character in the data. What does this mean?

A If you are using a RS232 handshake and the receiving device is slow the Shadow Mule may run out of buffer space. The Shadow Mule can store up to 94 characters before it must transmit to make space for more. If more characters arrive before the transmission has occured the Shadow Mule overwrites the last character with a tilde character to indicate what has happened. The solution is to use a faster receiving device or arrange that the keystrokes are slower.

Q The 'case' of alpha characters or the number keys are sometimes 'wrong'.

A Resync the Shadow Mule by pressing the 'caps lock' key a couple of times. See Advanced Information section for an explanation.

Q I am losing characters in the data stream.

A Your receiving device is too slow. Better results may be obtained by reducing the RS232 baud rate and/or using a RS232 handshake. The Shadow Mule can buffer over 90 characters, so a slow baud rate does not usually mean the Shadow Mule cannot handle fast bursts of data such as those coming from a barcode scanner or similar wedge hardware like the Altek Mule.

Q I have changed the DIP switch settings and they have not taken effect.

A The DIP switches are read only during the power up sequence and once per green LED flash. So it may take a second or two for changes to take effect. Changing DIP switches while the Shadow Mule is powered is not recommended and can (under some circumstances) cause the unit to hang. Normal operation will resume after a power down cycle.

Faulty Goods and our Returns Policy

Altek products are checked at every stage of manufacture and every unit is individually tested just prior to despatch. It is most unlikely that goods are faulty straight from the factory. Of all the 'faults' notified to us virtually all turn out to be user errors, computer faults or incompatibilities, cabling or connector faults, or programming errors.If you believe an Altek product is faulty please contact our Returns Department before returning it to us. You will be asked to describe the problem and we may ask you to speak to one of our engineers. If we feel the goods may be faulty we will give you a Returns Number which must be quoted with the returned goods. Goods returned without a Returns Authorisation Number will inevitably be subject to delay. Goods returned as 'faulty' and found to be fault free may incur a testing charge.

If you have an unanswered question please contact Technical Support.

Top Home            © Lee Allen,2018