This article describes the SerialKeys accessibility feature in Windows. This feature, in conjunction with a communications aid interface device, enables you to control the computer by using an alternative input device. Such a device needs only to send coded command strings through the computer's serial port to specify keystrokes and mouse events, which are then treated as typical keyboard or mouse input. This feature is designed for people who are unable to use the computer's standard keyboard and mouse.
In some cases, these special input devices can be connected to a computer's serial port (the connector commonly used for attaching a modem or printer). However, this is in itself not enough to enable you to emulate or control keyboard and mouse functions, because the computer is designed to receive keyboard and mouse signals through its keyboard and mouse ports.
Using SerialKeys enables you to control keyboard and mouse functions through the serial port. This is done by sending the right series of letters and commands from the special input device to the computer's serial port. You can still use the regular keyboard and mouse while you are SerialKeys. NOTE
: Typing on the standard keyboard while you are simultaneously entering commands by using SerialKeys can cause SerialKeys to loose track of the status of various keys on the standard keyboard.
The most commonly used special input device for SerialKeys is a communication aid, which is an electronic device often used by people who cannot communicate by speech alone because of a physical disability. Using SerialKeys requires you to program specific key definitions into the special input device. You need the documentation for the device to carry out this programming.
Setting Up SerialKeys
This section describes how to set up SerialKeys with a device such as a communication aid (referred to as "the aid" in these instructions), including how to hook up the aid to the computer, how to set up SerialKeys on the computer, and what letters or commands to send so you can type any key on the keyboard and make any mouse movement you want from the aid. Follow these instructions step-by-step. If you are the user of the aid, someone may need to assist you the first time you set up SerialKeys. NOTE
: These instructions do not tell you how to program a particular aid. You must consult the documentation for the aid, or contact the manufacturer if you have questions.
- Determine whether the communication aid works with SerialKeys.
First, make sure the aid works with SerialKeys. You should be able to answer "yes" to all of the following questions:
- Can you program selections on the aid to have unique words and sentences stored under them? Most electronic communication aids let you program any series of characters (letter, numbers, symbols) for a particular selection.
- Can the aid store at least 84 programmable selections? You need at least one selection space for each key on the computer's keyboard, plus more if you want to use the mouse. There are 84 keys on the standard IBM AT keyboard, and many keyboards now have 101 keys. You do not need to be able to store all of the keys and mouse actions on the same level (or overlay) on the aid. You might, for example, want to use one level for the keyboard and one for the mouse.
- Does the aid have a serial port? This is the connection used to attach a printer to your computer. It is sometimes called an RS-232 serial port.
- Can you program selections on the aid so that when they are selected, they are automatically sent to the serial port? Many aids have this capability, because it can be useful for printing messages. If you have a printer connected to the serial port, typing h-e-l-l-o on the aid and sending it out the serial port causes "hello" to be printed on the printer. If you have the aid's serial port connected to the computer's serial port, and you have SerialKeys working, typing h-e-l-l-o on the aid and sending it out the aid's serial port causes the word "hello" to appear on the computer screen--just as if you had typed it on the computer's keyboard.
- Does your computer have a serial port? This is sometimes called a COM port. If the computer does not have a serial port, you can probably add one. If you have a serial port but you are using it for something else, such as a printer or a modem, you must either disconnect the printer or modem or add another serial port.
- Can the aid send information through its serial port at the rate of 300 baud? (The term 300 baud refers to the speed at which characters are transmitted.) SerialKeys can "talk to" an aid that sends information at 300, 600, 1,200, 2,400, 4,800, 9,600, or 19,200 baud.
- Connect the aid to the computer.
Plug one end of the serial cable into the serial port on the aid and the other end into the serial port on the computer. If you do nt already have a serial cable, obtain one from the manufacturer of the aid.
NOTE: The aid may require an adapter to match the connector on the computer. In addition, the aid may require a null-modem adapter (available at most computer stores) to transmit properly with the computer.
- Configure the aid for serial transmission.
To communicate, the aid and SerialKeys must be transmitting to each other at the same speed (baud rate). The recommended speed is 300 baud. You must also make sure that the aid is configured with the following settings:
You do not have to know what this means; you just have to make sure the aid is configured this way. In addition, most aids have a special selection or a switch for sending the characters stored in the aid out the serial port. Make sure you turn on this function. Other aids may require that you program special codes to set up the serial port. In all cases, check the documentation for the aid to determine how to configure it.
- 1 start bit
- 8 data bits
- 1 stop bit
- No parity
- Activate SerialKeys.
NOTE: The SerialKeys feature is a special service in Windows NT or Windows 2000 that must first be activated by a user who has administrative privileges. To enable SerialKeys for use by other users, the administrator must follow these instructions and click Yes when prompted to save changes as the default for new users and the logon prompt.
To activate SerialKeys:
NOTE: SerialKeys does not attempt to verify whether the computer hardware actually supports COM ports 1 through 4. Rather, it depends on Windows to configure and communicate with the hardware. Before attempting to connect the communication aid, you may want to review your computer documentation to be sure it supports your choice of COM port.
- Click Start, point to Settings, click Control Panel, and then click Accessibility Options.
- On the General tab, click to select the Support SerialKeys Devices check box.
- Click the related Settings button.
- Click the appropriate serial port (COM port 1, 2, 3, or 4).
- Click the appropriate baud rate (Microsoft recommends 300 baud).
- Click OK.
- If you have administrator privileges in Windows NT or Windows 2000, you are prompted to save the changes as the default for new users and the logon prompt. Click Yes.
Programming Keys and Mouse Movement for SerialKeys
The following topics describe how to program each different type of key or mouse movement. Examples are provided to help you set up the aid and computer properly, and to help you understand how to program the aid before you program the complete set of keys and mouse movements. There are four types of SerialKeys actions you can program into any selection (position) on the aid:
- Basic keys
- Special keys
- Modifier keys
- Mouse movements
: Before you start typing keys, send three null characters from the aid to the computer. This resets SerialKeys. (The null character is different from a zero; you can typically make it on the aid by pressing CTRL+@.)
Typing Basic Keys by Using SerialKeys
Each key on your computer keyboard has a key name; it is this key name that you must program into the aid to be able to type that key. Many of the key names consist of a single character, which are referred to here as the "basic keys":
`1 2 3 4 5 6 7 8 9 0 -
q w e r t y u i o p [ ]
a s d f g h j k l ; '
z x c v b n m , . / \
To type one of these keys, you just send that single character out the serial port of the aid. For example, to type the word "hello," you simply select the "h" key name, the "e" key name, the "l" key name, another "l" key name, and finally an "o" key name. Most aids have all of these single-character key names programmed into them, so there is no additional programming to do for these keys.
Typing Special Keys by Using SerialKeys
Many keys do not have single-character key names. For example, the NUM LOCK and CAPS LOCK keys each have more than a single-character name. These are called special keys because you have to do something different to type them by using the aid. To type special keys, you must program a sequence of characters into a single selection on the aid. The sequence for special keys is different for each key, but always follows two rules:
- The sequence must begin with the escape character.
- The sequence must end with a period.
You can usually generate the escape character on the aid by selecting the Control function along with the left bracket ([). On some aids, this appears as ^[. Check the documentation for the aid if you are not sure how to make the escape character on it. This article refers to the escape character by putting "esc" between two brackets, like this: [esc].NOTE
: In these instructions, when you see [esc] in a sequence of characters, it means just one character (the escape character), not five characters, as it might appear.
To program the name of a special key into the aid:
- Program the escape character.
- Program the correct name for the special key.
- Program a period.
You should program these as one word or selection on the aid. When you need the special keys, the entire string is sent out to the serial port of the computer by making only one selection on the aid. For example, to type the ENTER key, the character sequence is:
SerialKeys has official names for each of the special keys on your keyboard. Because the sequences for special keys are somewhat long, you may want to program an entire sequence for a special key into a single selection on the aid. Then, you can label this selection (such as Enter) and have it ready for when you need to type the key. You will probably want to program the sequences for all the special keys on the computer keyboard into selections on the aid. The time you spend doing this will be made up many times after you begin using the aid to access the computer.
For additional information about how to set up the complete keyboard and for a table of all the key names, click the article number below to view the article in the Microsoft Knowledge Base:
Programming Assistive Aids for Keyboard and Mouse Functions with SerialKeys
Typing Modifier Keys (SHIFT, CTRL, ALT) by Using SerialKeys
There are three special keys that you must type differently from the other special keys: SHIFT, Control (CTRL), and Alternate (ALT). These three keys are called the modifier keys because they do not do anything themselves, but modify the action of another key. SHIFT, for example, makes a lowercase "a" into an uppercase "A." On an ordinary keyboard, you hold down the modifier key while you press the other key. SerialKeys imitates this action by using a command called "hold."
This is the sequence you have to type on the aid to type a modifier key:
- The escape character
- Comma (,)
- The word "hold"
- Another comma (,)
- The name for the modifier keyFor additional information about specific modifier keys, click the article number below to view the article in the Microsoft Knowledge Base:
Programming Assistive Aids for Keyboard and Mouse Functions with SerialKeys
- Period (.)
- The key you want to modify
For example, use the following command string to send an uppercase A on your computer by using SerialKeys.
[esc],hold,shift. Holds the SHIFT key down a while you send the "a" key)
Remember that [esc] means the escape character on the aid. Also, do not forget the commas and the period. If you typed the sequence successfully, an uppercase A should appear on your computer screen, just as if you had held down the SHIFT key on the regular keyboard and then pressed the "a" key.
Most keyboards have two SHIFT keys, a right SHIFT key and a left SHIFT key. You can use different key names (lshift and rshift) for the two keys to distinguish between them if you want. Some keyboards also have right and left Control keys and right and left Alternate keys. SerialKeys also distinguishes between these.
For additional information about setting up the complete keyboard, and for a table of all the key names, click the article number below to view the article in the Microsoft Knowledge Base:
Programming Assistive Aids for Keyboard and Mouse Functions with SerialKeys
Using SerialKeys to Move and Click the Mouse
If your computer is equipped to use a mouse, you can operate all the mouse functions from the aid as well by using SerialKeys.
Before you perform any mouse functions by using SerialKeys, you should send the moureset
(mouse reset) command. Do this whenever you start up a program (such as a word processing program) that uses the mouse. Send this command from the aid:
The mouse pointer should move to the upper-left corner of the screen.To Move the Mouse:
You can perform the equivalent of moving the mouse by sending a move
command from the aid to the computer. These are the parts of a move
command, in the proper order:
- The escape character (see the "Typing Special Keys by Using SerialKeys" section if you do not know what this is)
- The word "move"
- Plus (+) or minus (-) sign followed by a number (for horizontal movement)
- Plus or minus sign followed by a number (for vertical movement)
command takes two numbers: first, the motion in the horizontal direction, and then the motion in the vertical direction. There must be either a plus (+) or a minus (-) sign before each number, unless the number is a zero. Positive numbers move the mouse pointer to the right or down. Negative numbers move the mouse pointer to the left or up. For example:
To Click the Mouse:
[esc],move,+10,-20. Moves 10 units to right and 20 units up[esc],move,-10,+20. Moves 10 units to left and 20 units down
To click a mouse button, you use the click
command. Type the commands as you see here. Remember, [esc] means a single "escape" character. For example:
To Double-Click the Mouse:
[esc],click,left. Clicks the left button[esc],click,right. Clicks the right button
You can double-click the mouse by using the same commands as shown above, but with the dblclick
command in place of the click
command. For example:
[esc],dblclick,left.To Click and Drag with the Mouse:
SerialKeys lets you perform the equivalent of holding the mouse button down while you are moving the mouse ("dragging") by using the moulock
(mouse lock) and mourel
(mouse release) commands, together with the move
command. If, for example, you want to select text in a word processing program that uses the mouse:
- Move the mouse to the beginning of the text you want to select by using the move command as described earlier.
- Press the mouse button down and hold it down by using the moulock command:
- Move the mouse to the end of the text you want to select by using the move command as described earlier.
- Release either button (or both) by using the mourel command: