Keyboard Codes
Codes generated by the keyboard logic can be used when defining a personal keyboard translation table.
Use the /key switch to generate an initial translation table. This switch can also be used for recording and viewing the codes generated by various keys and key combinations.
Note: The BackSpace, Control+Z and Enter keys generate codes with /key, that are different from those that normally occur. These codes are on the typewriter section of the keyboard.
Alphanumeric keys generate single-byte codes corresponding to the ASCII-7 and ISO Latin-1 character sets. All other keys and key combinations generate two-byte code sequences. The first byte indicates the section of the keyboard that the key is on and the state of the Alt, Control and Shift keys. The following table describes the valid Alt, Control, and Shift key combinations:
Alt | Control | Shift | Typewriter | Keypad |
---|---|---|---|---|
N | N | N | 128 | 136 |
N | N | Y | 129 | 137 |
N | Y | N | 130 | 138 |
N | Y | Y | 131 | 139 |
Y | N | N | 132 | 140 |
Y | N | Y | 133 | 141 |
Y | Y | N | 134 | 142 |
Y | Y | Y | 135 | 143 |
The keypad is on the right-hand side of the keyboard, and contains navigation keys, numeric keys, and so-called "gray" keys (for example +, -, /, * and Enter). All other keys, including the "extended" navigation and editing keys, are considered part of the typewriter section.
The second byte of a keyboard code specifies the key that was pressed. For alphanumeric keys, this byte is the ASCII/ISO code of the character. Other keys are encoded as shown below:
Key | Code | Mnemonic | Key | Code | Mnemonic |
---|---|---|---|---|---|
Backspace | 8 | ^BS | F6 | 106 | - |
Tab | 9 | ^HT | F7 | 107 | - |
Return/Enter | 13 | ^CR | F8 | 108 | - |
Escape | 27 | ^ESC | F9 | 109 | - |
Delete | 146 | - | F10 | 110 | - |
Insert |
148 |
- | F11 | 111 | - |
End |
149 |
- | F12 | 112 | - |
Down |
150 |
- | F13 | 113 | - |
Page Down |
151 |
- | F14 | 114 | - |
Left |
152 |
- | F15 | 115 | - |
Center |
153 |
- | F16 | 116 | - |
Right |
154 |
- | F17 | 117 | - |
Home |
155 |
- | F18 | 118 | - |
Up |
156 |
- | F19 | 119 | - |
Page Up |
157 |
- | F20 | 120 | - |
F1 |
101 |
- | F21 | 121 | - |
F2 |
102 |
- | F22 | 122 | - |
F3 |
103 |
- | F23 | 123 | - |
F4 |
104 |
- | F24 | 124 | - |
F5 |
105 |
- | - | - | - |