----------------------------------------------------------------- ------------------------------ | | | | | | | | ENGINEERING | D | I | G | I | T | A | L | SPECIFICATION | | | | | | | | ------------------------------ ----------------------------------------------------------------- LK200 FUNCTIONAL SPECIFICATIONS Copyright (c) May, 1982 Digital Equipment Corporation Author L. Huntington These designs and specifications are the sole property of Digital Equipment Corporation and shall not be reproduced, copied or used in whole or in part as a basis for the manufacture or sale of any equipment described herein without written permission of the owner. Table of Contents _________________ Section Page 1.0 INTRODUCTION 1 1.1 Scanning 2 1.1.1 Timing Requirements 2 1.1.2 Sneak Path Detection 2 1.1.3 Rollover 2 1.2 Transmission 2 1.2.1 Transmission Buffer and speed 2 1.2.2 Transmission Encoding 2 1.3 Receive 3 1.3.1 Receive Buffer and Speed 3 1.3.2 Receive Encoding 3 2.0 KEYBOARD FUNCTIONAL DIVISIONS 3 3.0 MODES 3 3.1 Down Only 4 3.2 Down, Autorepeat 4 3.3 Down/up 4 3.4 Special Considerations Regarding Autorepeat 4 3.5 Special Considerations Regarding Down/up mode 6 3.6 Autorepeat Rates 6 4.0 KEYBOARD PERIPHERALS 6 4.1 Audio 6 4.2 LED's 7 5.0 KEYBOARD-TO-TERMINAL PROTOCOL 7 5.1 Keycode Transmission 7 5.2 Special Code Transmission 7 5.3 Powerup Transmission 9 6.0 TERMINAL-TO-KEYBOARD PROTOCOL 9 6.1 Commands 10 6.2 Parameters 10 6.3 Peripheral Commands 11 6.3.1 Flow control 12 6.3.2 LED's 13 6.3.3 Audio 13 6.3.4 Autorepeat 13 6.3.5 Other 13 6.4 Mode Set Commands 14 6.4.1 Division Mode Settings 14 6.4.2 Autorepeat Rate Buffer Association 15 6.4.3 Autorepeat Rate Buffer Values 15 7.0 SPECIAL CONSIDERATIONS 16 7.1 Error Handling 16 7.2 Keyboard Locked Condition 17 7.3 Reserved code 17 7.4 Test mode 17 7.5 Future Expansion 17 Page ii Table of Contents _________________ Section Page 8.0 APPENDIX I KEYCODE TRANSLATION TABLE 19 9.0 APPENDIX II DEFAULTS 24 10.0 APPENDIX III KEYBOARD MATRIX 25 11.0 APPENDIX IV KEYSWITCH LAYOUT 27 Page 1 1.0 INTRODUCTION This document is a specification of the firmware functionality available in the LK200 keyboard. Products using the LK200 may use only a subset of the functionality available in the keyboard. The firmware inside the keyboard is responsible for executing three concurrent tasks. The first task consists of detecting any changes in the state of the keyboard matrix, referred to as the process of scanning the keyboard. The second task consists of transmitting the results of the keyboard scan to the terminal. The third task consists of receiving information from the terminal. This information may control either the peripheral hardware or the transmission parameters on the LK200. Page 2 1.1 SCANNING 1.1.1 Timing Requirements The LK200 firmware is responsible for handling a Keystroke depressed for as little as 20 ms., during which time the switch closure may be expected to bounce for 5 ms. Multiple keys will be detected in correct order when interkeying times are not less than 8.33 ms. Given the susceptibility to high frequency noise, each key must be verified as a legitimate event. Scan rate is 120 hertz, or 8.33 ms. 1.1.2 Sneak Path Detection A sneak path, or "ghost" key may occur only when 3 out of 4 corners of a rectangle in the keyboard matrix are closed. Sneak paths will be prevented by carefully laying out the keyboard matrix positions, so that the keys belonging to a single fingers zone are not found in the same row. However, should a sneak path occur, firmware will not transmit the keys involved until one of the keys causing the condition is released. This will prevent the transmission of ghost keys entirely. 1.1.3 Rollover With the exception of those keys involved in a sneak path arrangement, the keyboard will transmit ALL keys depressed. It is, however, limited by transmission speed and the size of its output buffer. The keyboard is capable of transmitting 4 bytes per scan. Rollover is determined by the amount of time the keys are held down. If they are held down for 17 ms., the keyboard will scan them twice, and therefore be able to send 8 keycodes from its 4-byte fifo. Actually, 17 ms. is considered to be below the minimum time that the keys can be held closed. If the keys are held down for another scan (25 ms.), then 12 keycodes can be transmitted. Of course, if there are sneak paths involved, not all keys can be transmitted. 1.2 TRANSMISSION 1.2.1 Transmission Buffer and Speed The LK200 has a transmission speed of 4800 bps and a fifo size of 4 bytes. 1.2.2 Transmission Encoding Encoding of transmit and receive data is identical. Each encoded event is framed into 10 single elements, each element being transmitted at equal time intervals. The first element (0) will Page 3 be the start (spacing) element; the next 8 elements will contain data. The last element will be the stop (1) element. 1.3 RECEIVE 1.3.1 Receive Buffer and Speed The LK200 has a receive speed of 4800 bps and a fifo size of 4 bytes. Commands are processed within 1 ms. after the entire command is received. 1.3.2 Receive Encoding Encoding of transmit and receive data is identical. Each encoded event is framed into 10 single elements, each element being transmitted at equal time intervals. The first element (0) will be the start (spacing) element; the next 8 elements will contain data. The last element will be the stop (1) element. 2.0 KEYBOARD FUNCTIONAL DIVISIONS The keyboard is divided into 14 functional divisions. These fourteen functional divisions are: Division ________ 1. 48 graphic keys, Spacebar and B13, D13, D99 and E99 on the typewriter mass 2. Numeric keypad 3. Delete Character(E12) 4. Return(C13) and Tab(D00) 5. Lock(C00), COMPOSE(A99) and A10 6. Shift(B00 and B11) and CTRL (C99) 7. Horizontal cursors(B16 and B18) 8. Vertical cursors(B17 and C17) and A17 9. Six keys directly above the cursor keys (D16-D18 and E16-E18) Function Keys 10. G99-G04 and H99-H04 11. G05-G09 and H05-H09 12. G10-G14 and H10-H14 13. G15-G16 14. G20-G23 and H20-H23 See Appendix IV for keyswitch designators. 3.0 MODES Section 3 explains the overall function of the three keycode transmission modes. For actual mode set and special code Page 4 transmission protocol, please see sections 5.1, 6.3 and 6.4. Any one of the keyboard's functional divisions may be set to any one of the following modes. Mode Function ____ ________ Down only Keyboard sends key code when key is first depressed. Autorepeat, Down Keyboard sends key code when key is first depressed, then sends "metronome" code and sounds keyclick at the specified or default rate, until that key is released. Down UP keyboard sends key code when key is first depressed, and either key code or "all ups" code when key is released. See Appendix II for division defaults. 3.1 Down only "Down only" keys transmit a keycode when they are depressed. 3.2 Down, Autorepeat "Autorepeat" keys transmit a keycode when they are depressed. If the key is held down past the specified or default timeout period (usually 300 to 500 ms.), then a fixed "metronome" code is transmitted. "metronome" codes will then be sent at regular intervals until the key is released. 3.3 Down/up Mode "Down up" keys transmit a keycode when they are depressed and an "up code" when they are released. The "up code" will be either a repeat of the keycode or an "all ups" code. If there are any other down/up keys down on the keyboard, it will be a repeat of the keycode. If there are no other down/up keys down on the keyboard, it will be an "all ups" code. 3.4 Special Considerations Regarding Autorepeat If multiple autorepeating keys are held down, "metronome" codes will still be generated. The metronome codes apply to the keycode which was transmitted most recently. If that "last key down" is released, and other key(s) is(are) still down, the keycode of one of the "down" keys will be retransmitted. Page 5 Example: Suppose the "a" key is being held down. Transmission will look like this: a metronome metronome Now suppose the "b" key is depressed. a metronome metronome b metronome metronome Now the "b" key is released. a metronome metronome b metronome metronome a met. met. A non-autorepeating keycode or special code may be transmitted while metronome codes are being generated for an autorepeating key. In this case, the keyboard will transmit, in the place of the next metronome code, the keycode of the key which is supposed to be autorepeating. This way, the keycode to be autorepeated is always the LAST BYTE TRANSMITTED. Example: Suppose the "a" key is being held down. Transmission will look like this: a metronome metronome Now suppose the SHIFT key is depressed. a metronome metronome shift a metronome Now the SHIFT key is released. a metronome metronome shift a metronome allups a met... If, for any reason, an autorepeating key should not autorepeat (such as a CTRL "C", for example), the terminal should issue a "temporary inhibit autorepeat" command. This will halt the transmission of any metronome codes or keyclicks FOR THAT KEY ONLY. Metronome codes will resume when another key is depressed. The command must be issued after the keycode for the autorepeating key is received. Autorepeat can be enabled and disabled independently of the division settings, using the enable/disable autorepeat commands. This is an "across the board" enable/disable. Internally, the keyboard is still autorepeating characters while autorepeat is disabled, but simply does not transmit metronome codes or keyclicks. Therefore, when autorepeat is enabled, the keyboard will resume metronome transmission at the point where it would be if autorepeat were not disabled in the first place. This may be within EITHER the timeout or interval period, depending upon the time elapsed since key depression. During the period that a key is depressed, the keyboard may receive a request to change that division's mode to autorepeat. This change will be implemented by the LK200 immediately. After the regular timeout period, the keyboard will transmit metronome codes for the key depressed. In place of the first metronome code, the Keyboard will transmit the keycode of the autorepeating key. It is possible to change the mode of all autorepeating divisions to down only with one command. This and some other across-the- board autorepeat commands are grouped with the "peripheral" commands. (see section 6.3) Page 6 3.5 Special Considerations Regarding Down/up Mode. If two down/up keys are released simultaneously, (within the same scan), and there are no other down/up keys down on the keyboard, only one "all ups" code will be generated. 3.6 Autorepeat rates There are four buffers in the keyboard to store autorepeat rates. They are numbered O through 3. Two values are stored in each buffer. The first value is the "timeout" value. The second is the "interval" value. The values in each buffer can be changed by the terminal. The "timeout" value reflects the amount of time between the detection of a key down and the transmission of the first metronome code (defaults range from 300 to 500 ms.) The "interval" value reflects number of metronome codes per second (defaults to 30). Each division is associated with one of the four buffers. Rates are taken from the associated buffer each time the autorepeat timers are loaded. This buffer-to-division association can be changed by the terminal or left to default. 4.0 KEYBOARD PERIPHERALS Section 4 is an overall explanation of the peripherals available on the keyboard. See section 6.3 for information on terminal control of these peripherals. Keyclick, bell and LED's are all considered "peripherals" on the keyboard. 4.1 Audio Keyclick is a 2 ms. "beep". Bell is a 125 ms. "beep". Bell is sounded ONLY upon request from the terminal. Keyclick (if not disabled by the terminal) is sounded under three conditions: 1. When a Key is depressed 2. When a metronome code is sent. 3. When a "sound keyclick" command is received from the terminal. Keyclick will NOT be generated when Keys B11 or B99 (the left and right SHIFT keys on the LK201) are depressed. Keyclick will NOT be generated when key C99 (the CTRL key on the LK201) is depressed, unless a command is sent from the terminal to enable keyclick on that Key. (see section 6.3, key positions illustrated in Appendix IV) Either keyclick or bell (or both) may be disabled. When keyclick or bell is disabled, it will not sound, even if the terminal Page 7 requests it. (see section 6.3 for enable and disable audio commands). Both keyclick and bell may be set (independently) to one of 8 volume levels. Volume levels are as follows: 000 - highest 001 010 - default 011 100 101 110 111 - lowest 4.2 LED's The terminal is responsible for transmitting LED control commands, with the following exceptions: 1. The keyboard will turn OFF all LED's on powerup. 2. The keyboard will light the Keyboard Locked LED upon receipt of an "inhibit transmission" command and turn it off upon receipt of a "resume transmission" command. 5.0 KEYBOARD-TO-TERMINAL PROTOCOL 5.1 Keycode Transmission The keyboard is responsible for transmitting single-byte keycodes which reflect the state of the keyboard matrix. The 8-bit codes above 64 are used for keycodes. Every key is identified by its unique keycode. There are no special codes for shifted or control keys. See Appendix I for the complete keycode matrix translation table. 5.2 Special Code Transmission There are also 13 "special" codes, some with values above 64, some below. Nine special codes have been defined above 64, (keycode value range): 1. ALL UPS Keycode 179 Dec, B3 Hex 2. METRONOME CODE Keycode 180 Dec, B4 Hex 3. OUTPUT ERROR Keycode 181 Dec, B5 Hex 4. INPUT ERROR keycode 182 Dec, B6 Hex 5. KBD LOCKED ACK Keycode 183 Dec, B7 Hex 6. TEST MODE ACK Keycode 184 Dec, B8 Hex 7. PREFIX TO KEYS DOWN Keycode 185 Dec, B9 Hex 8. MODE CHANGE ACK Keycode 186 Dec, BA Hex 9. RESERVED Keycode 127 Dec, 7F Hex Page 8 Four special codes have also been defined within the "below 64" value range. 1. KEYBOARD ID - FIRMWARE (01 Dec, 01 Hex) 2. KEYBOARD ID - HARDWARE (00) 3. KEY DOWN ON POWER UP ERROR CODE (61 Dec, 33 Hex) 4. POWERUP SELF-TEST ERROR CODE (62 Dec, 3E Hex) METRONOME CODE indicates to the terminal that an interval has passed, a keyclick has been generated, and the last key received by the terminal is still depressed. ALL UPS indicates to the terminal that a down/up mode key was just released, and that now there are no more down/up keys down on the keyboard. OUTPUT ERROR indicates to the terminal that the keyboard's output buffer overflowed after receipt of a "keyboard inhibit" command from the terminal, and that some keystrokes may have been lost. INPUT ERROR CODE indicates to the terminal that the keyboard received a garbage command, or too many or too few parameters. KEYBOARD LOCKED CONFIRMATION indicates to the terminal that the keyboard received an "inhibit transmission" command. (see section 6.3) TEST MODE ACKNOWLEDGE indicates that the keyboard has gone into TEST MODE. This is a special mode inserted for a production bed-of-nails tester. If the terminal receives this acknowledge unsolicited, it should send "80 HEX", which will terminate test mode and jump to powerup. MODE CHANGE ACKNOWLEDGE indicates that the keyboard has received and processed a mode change command. (see section 6.4) PREFIX TO KEYS down indicates that the next byte is a keycode for a key already down in a division which has been changed to down/up. (see Section 6.4) Keycode 7F is reserved for internal use. KEYBOARD ID is a two byte identification code, transmitted after the powerup self-test is performed. (see section 5.3) it will also be sent upon request from the terminal (see section 6.3) POWER UP SELF TEST ERROR CODE indicates to the terminal that the ROM or RAM self-test of the terminal failed. (see section 5.3) The keyboard may be locked by command from the terminal. Upon receiving the "inhibit transmission" command, the keyboard will light the "Keyboard locked" LED. It will then transmit the KEYBOARD LOCKED ACKNOWLEDGE special code. The keyboard will attempt to buffer characters (up to four) until its output buffer overflows. Then it will stop scanning its matrix. When the keyboard is subsequently unlocked by the terminal, it will transmit all bytes collected in its buffer, followed by the "OUTPUT ERROR," special code if the buffer overflowed while the keyboard was locked. Page 9 5.3 Power Up transmission Upon powerup, the LK200 will perform a self test and transmit the results of that self-test to the terminal in 4 bytes. BYTE 1: KBID (firmware) - the keyboard ID which is stored in firmware BYTE 2: KBID (hardware) - the keyboard ID which is read from jumpers in the hardware BYTE 3: ERROR or O - Two error codes indicate either a) failure of ROM or RAM self-test within the processor (3E HEX) b) keydown on powerup (3E HEX) BYTE 4: KEYCODE or O - the keyboard does a complete scan for keys down on powerup. There should be none. If there are, the error code (above) will be set and first keycode detected will be sent as the fourth byte. If the ROM self-test (checksum) fails, the error may be catastrophic. The keyboard may be unable to send anything at all. If the keyboard finds a key down on the first scan, it will continue to look for an "all key UP" condition. If the offending key(s) is (are) released, then the keyboard will send the corrected 4-byte powerup sequence (unsolicited). This is an attempt to avoid a fatal error condition when a user inadvertently holds down a key while powering up. The keyboard LED's are all lit during powerup. If the self-test passes, the keyboard will turn all LED's off. The terminal may transmit a "sound bell" command to the keyboard if a bell is desired upon powerup. This should not be done until the last byte of the four-byte sequence is received by the terminal. This will test the serial line and terminal connection. Powerup self test will not exceed 70 ms. A jump to powerup can be requested at any time from the terminal. Please note that a jump to powerup will cause the LED's on the keyboard to "blink" on and off once. 6.0 TERMINAL-TO-KEYBOARD PROTOCOL. The terminal can control both the peripherals associated with the Keyboard and some of the keyboard transmit characteristics. The protocol for the transmission of commands and parameters from the terminal to the Keyboard is as follows: Page 10 6.1 Commands There are two types of commands-- those that control keyboard transmission characteristics and those that control keyboard peripherals. The LOW bit of the command is the "TYPE flag". It is clear if the command is a TRANSMISSION command. It is set if the command is a PERIPHERAL command. TRANSMISSION COMMANDS PERIPHERAL COMMANDS _____________________ ___________________ mode set flow control autorepeat rate set led audio keyboard ID reinitiate kbd some autorepeat control jump to test mode reinstate defaults The HIGH order bit of every command is the "PARAMS" flag. It is clear if there ARE any parameters to follow. It is set if there are NO parameters. 6.2 Parameters The HIGH order bit of every parameter is the "PARAMS flag". It is clear if there are more parameters to follow. It is set on the last parameter. The remaining 7 bits of the parameter are for data. COMMAND SUMMARY (with parameters) 7 6 5 4 3 2 1 0 ------------------------------------- COMMAND: | O | representation | mode or|type| | | | off/on | | ------------------------------------- PARAMETERS: ------------------------------------- | O | data | ------------------------------------- ------------------------------------- | 1 | data | ------------------------------------- Page 11 6.3 Peripheral Commands Command Representation _______ ______________ Flow Control 0001 LED 0010 Keyclick 0011 Bell 0100 KBD ID 0101 Reinitiate keyboard 0110 to defaults (Jmp to PWRUP) Keyclick for CTRL key 0111 Temporarily inhibit autorepeat 1000 Jump to test mode 1001 Table I To send a "Peripheral" type command, set TYPE flag (low order bit). Bits 6 - 3 contain a COMMAND representation from the above chart. Bits 2 and 1 specify on (01), off (00), or sound (11). Bit 7 should be set if there are no parameters to follow. Page 12 The following chart summarizes the peripheral commands in HEX. ------------------------------------------------------- | FUNCTION | HEX | PARAMETERS | |============================|=========|================| | Flow control | | | |----------------------------|---------|----------------| | resume kbd xmission | 8B | NONE | | inhibit kbd xmission | 89 | NONE | |----------------------------|---------|----------------| | LED's | | | |----------------------------|---------|----------------| | light LED(s) | 13 | Bit pattern | | turn off LED(s) | 11 | Bit pattern | | | | | |----------------------------|---------|----------------| | Audio | | | |----------------------------|---------|----------------| | disable keyclick | 99 | NONE | | enable click, set vol | 1B | volume | | disable CTRL keyclick | B9 | NONE | | enable CTRL keyclick | BB | NONE | | sound keyclick | 9F | NONE | | disable bell | A1 | NONE | | enable bell, set vol | 23 | volume | | sound bell | A7 | NONE | | | | | |----------------------------|---------|----------------| | Autorepeat | | | |----------------------------|---------|----------------| | Temp. autorpt inhibit | C1 | NONE | | Enable AR across kbd | E3 | NONE | | Disable AR across kbd | E1 | NONE | | Change all AR to down only | D9 | NONE | | | | | |----------------------------|---------|----------------| | Other | | | |----------------------------|---------|----------------| | Request keyboard ID | AB | NONE | | Reinitiate keyboard | FD | NONE | | Jump to test mode | CB | NONE | | Reinstate defaults | D3 | NONE | ------------------------------------------------------- Table II 6.3.1 FLOW CONTROL The terminal can "lock" the keyboard with the "inhibit keyboard transmission" command. When the keyboard is subsequently unlocked, it will respond with an error code if any keystrokes may have been missed. (see section 7.2) Page 13 6.3.2 LED'S The LED parameter can be summarized as follows: --------------------------------------------------------------- | 1 | 0 | 0 | 0 | LED 4 | LED 3 | LED 2 | LED 1 | --------------------------------------------------------------- The LED structure on the keyboard can be summarized as follows: [O] [O] [0] [0] LED 4 LED 3 LED 2 LED 1 6.3.3 AUDIO The audio volume parameter can be summarized as follows: --------------------------------------------------------------- | 1 | 0 | 0 | 0 | 0 | 3-bit volume | --------------------------------------------------------------- Volume levels are as follows: 000 - highest 001 010 011 100 101 110 111 - lowest Either keyclick or bell (or both) may be disabled. When keyclick or bell is disabled, it will not sound, even if the terminal requests it. 6.3.4 AUTOREPEAT TEMPORARY AUTOREPEAT INHIBIT - stop autorepeat for this key only. Autorepeat will automatically resume when another key is depressed. DISABLE/ENABLE AUTOREPEAT ACROSS KEYBOARD - stop/start transmission of metronome codes without affecting autorepeat timing or division settings. CHANGE ALL AUTOREPEAT TO DOWN ONLY - change division settings for all autorepeating divisions to down only. 6.3.5 OTHER REQUEST KEYBOARD ID - keyboard will send 2-byte keyboard ID. Keyboard will not jump to POWER UP. Page 14 REINITIATE KEYBOARD - keyboard will jump to its POWERUP routine. Note: terminal should not try to transmit anything to keyboard until the last byte of the powerup sequence has been received. JUMP TO TEST MODE - special test mode for production test REINSTATE DEFAULTS - set the following functions back to the powerup default settings: Division mode settings Autorepeat interval and timeout rates Autorepeat buffer selections Audio volume Control key keyclick 6.4 Mode Set Commands 6.4.1 Division Mode Setting For an explanation of transmission modes and rates, see section 3. Each DIVISION on the keyboard has a unique 4-bit representation, as follows: Division Representation ________ ______________ 1. 48 graphic keys, Spacebar 0001 and B13, D13, D99 and E99 on the typewriter mass 2. Numeric keypad 0010 3. Delete character 0011 4. Return(C13) and Tab(D00) 0100 5. Lock(C00), COMPOSE(A99) and A10 0101 6. Shift(B00 and B11) and CTRL (C99) 0110 7. Horizontal cursors(B16 and B18) 0111 8. Vertical cursors(B17 and C17) 1000 and A17 9. Six keys directly above the cursor 1001 keys(D16-D18 and E16-E18) Function keys 10. G99-G04 and H99-H04 1010 11. G05-G09 and H05-H09 1011 12. G10-C14 and H10-H14 1100 13. G15-G16 1101 14. G20-G23 and H20-H23 1110 Table III See Appendix IV for keyswitch designators. Page 15 Each MODE has a unique 2-bit representation. Modes Representation _____ ______________ Down only 00 Autorepeat, Down 01 Down Up 11 Table IV To set key transmission mode on a particular keyboard division, the terminal must send the PARAMS flag, followed by the keyboard division representation with the mode representation, followed by the TYPE flag (cleared). Example: (set main array to down/up) |param| division | mode |type | ----------------------------------------------- | 1 | 0 0 0 1 | 1 1 | 0 | ----------------------------------------------- 7 6 5 4 3 2 1 0 The PARAMS flag of the mode set command will be set to 1 if there are no parameters. The params flag will be clear if there are parameters. 6.4.2 Autorepeat Rate Buffer Association - If the mode selected is autorepeat, the terminal may elect to transmit a parameter to change the buffer association of the selected division. (See appendix II for defaults) Example: (set main array to autorepeat, change buffer association to buffer 3) |param| division | mode |type | ----------------------------------------------- | 0 | 0 0 0 1 | 0 1 | 0 | ----------------------------------------------- | 1 | 0 0 0 0 0 1 | 0 | ----------------------------------------------- 7 6 5 4 3 2 1 0 6.4.3 Autorepeat Rate Buffer values At keyboard powerup time, the four autorepeat rate buffers will contain default values. (see section 3.6, defaults in appendix II) The terminal may change these values, as shown below. In the command byte, bit 7 (PARAMS flag) should be clear. Bits 6-3 should be 1111 (to indicate that this is a RATE SET command). Bits 2-1 should be the buffer number (O to 3). Bit 0 (TYPE flag) should be clear. There should be two parameters, carrying the rate set data. Page 16 Example: change rates in buffer 3 |param| rate change command | buffer # |type | ----------------------------------------------- | 0 | 1 1 1 1 | 1 1 | 0 | ----------------------------------------------- | 0 | Param 1 (timeout) | ----------------------------------------------- | 1 | Param 2 (interval) | ----------------------------------------------- 7 6 5 4 3 2 1 0 The first parameter should specify TIMEOUT to be stored in the selected buffer. The second parameter should specify INTERVAL. 1. TIMEOUT This number represents the amount of time the keyboard will wait before autorepeating a character. 2. INTERVAL This number is the effective rate at which characters should be transmitted, i.e. once very X ms. For example, to set the autorepeat rate to be stored in buffer 1, terminal firmware will transmit: 00000011 followed by two bytes of numeric parameters, as follows: The Autorepeat TIMEOUT will be the transmitted number, times 5 ms. i.e. In order to specify a rate of 5 ms. delay, the first parameter received would be 00000001. The maximum allowed is 630 ms., or 01111110. THE TERMINAL MUST NOT SEND 631 - or 01111111. This code is reserved for internal use of the keyboard. 00 is also an illegal value. Autorepeat TIMEOUT will be implemented as a multiple of 8.33 ms., which is the keyboard's internal scan rate. For this reason, TIMEOUT rates can vary +/- 4.15 ms. The Autorepeat INTERVAL will be the number of metronome codes per second. In order to specify a speed of 16 hertz, the second parameter received would be 10010000. (note that the high order bit is set because it is the last parameter). The highest which may be sent is 126, or 11111100. THE TERMINAL MUST NOT SEND 127 - or 11111101. This code is the PWRUP command. The lowest rate which can be implemented by the keyboard is 12 hz. Values as low as 1 may be transmitted, but they will be translated to 12 hz. 7.0 SPECIAL CONSIDERATIONS 7.1 Error Handling. There are 4 error codes. The first 2 are sent at power up time if self-test fails. (see section 5.3) Page 17 The other two are the INPUT error code and the OUTPUT error code. OUTPUT error (B6 HEX) is sent ONLY upon receipt of a "resume transmission" command, if the output buffer overflowed while the keyboard was locked. INPUT error (B6 HEX) is sent whenever the Keyboard detects noise (unidentified command or parameter) on the line. B6 is also sent if the keyboard detects a delay of more than 100 ms. when expecting a parameter. 7.2 Keyboard Locked Condition When the keyboard receives a command to "inhibit transmission" it will transmit one more byte. This is a special code to indicate that the Keyboard is locked. If the terminal receives this code unsolicited, it is an indication that noise on the line was interpreted as an "inhibit transmission" command. It should immediately send the "resume transmission" command to unlock the keyboard. Due to limited RAM within the keyboard, the output FIFO is small (4 bytes). When the Keyboard is locked it will attempt to buffer characters received from the keyboard. When the Keyboard is subsequently unlocked it will transmit all 4 bytes in its output buffer. If any keystrokes have been missed, due to buffer overflow, the keyboard will transmit an error code as the fifth byte. Any keys which were not transmitted and are still being held down when the keyboard is "unlocked" will be processed as new keys. Therefore, an error code upon keyboard "unlock" indicates to the terminal a POSSIBLE loss of keystrokes. The keyboard stops scanning its matrix while its buffer is full. It does, however, process all incoming commands. 7.3 Reserved Code The number 7F (hex) is reserved for the internal use of the keyboard input and output buffers handling routines. 7.4 Test mode The keyboard will jump into a test mode by command from the QV/DIAGNOSE bed-of-nails tester used in production test. It will transmit a special code to the terminal to confirm test mode. If a terminal receives this code unsolicited, it should send the byte 80(HEX) to resume. (this will cause a jump to powerup). Page 18 7.5 Future Expansion In order to provide for expansion of functionality, the following keycodes have been reserved for future use as special codes or keycodes, and should be ignored if received by a terminal that does not support them: decimal hex decimal hex _______ ___ _______ ___ 110 56E 173 AD 122 7A 187 BB 165 A5 218 DA 156 A6 228 E4 172 AC Page 19 8.0 APPENDIX I -- KEYCODE TRANSLATION TABLE Keycodes 00 thru 64 are reserved. keycodes 65 thru 85 are unused. Please note that the legends given under "Keycap" are taken from the keycap legends of the LK201AA (American), as known at this time. They are provided for convenience only, and are not necessarily complete or up to date. Those keys which do not exist on the LK201 are labeled "unused". Key positions may be referenced in Appendix IV. ----------------------------------------------------------------- DIVISION POSITION KEYCAP KEYCODE KEYCODE (see pg 30) (dec) (hex) ----------------------------------------------------------------- ================================================================= Function Keys ----------------------------------------------------------------- 10 G99 HOLD SCREEN 086 56 G00 PRINT SCREEN 087 57 G01 BREAK 088 58 G02 SETUP 089 59 G03 F5 090 5A G04 unused 091 5B H99 unused 092 5C H00 unused 093 5D H01 unused 094 5E H02 unused 095 5F H03 unused 096 60 H04 unused 097 61 098 62 ----------------------------------------------------------------- 099 63 11 G05 INTERRUPT 100 64 G06 RESUME 101 65 G07 CANCEL 102 66 G08 MAIN SCREEN 103 67 G09 EXIT 104 68 H05 unused 105 69 H06 unused 106 6A H07 unused 107 6B H08 unused 108 6C H09 unused 109 6D --- reserved for future use 110 6E ----------------------------------------------------------------- 111 6F 12 G10 unused 112 70 G11 F11 (ESC) 113 71 G12 F12 (BS) 114 72 G13 F13 (LF) 115 73 G14 ADDITIONAL OPTIONS 116 74 H10 unused 117 75 H11 unused 118 76 H12 unused 119 77 H13 unused 120 78 H14 unused 121 79 --- reserved for future use 122 7A Page 20 ----------------------------------------------------------------- DIVISION POSITION KEYCAP KEYCODE KEYCODE (see pg 30) (dec) (hex) ----------------------------------------------------------------- 123 7B 13 G15 HELP 124 7C G16 DO 125 7D ----------------------------------------------------------------- 126 7E --- RESERVED FOR INTERNAL USE 127 7F 14 G20 F17 128 80 G21 F18 129 81 G22 F19 130 82 G23 F20 131 83 H20 unused 132 84 H21 unused 133 85 H22 unused 134 86 H23 unused 135 87 ================================================================= 6 basic editing keys ----------------------------------------------------------------- 136 88 137 89 9 E16 FIND 138 8A E17 INSERT HERE 139 8B E18 REMOVE 140 8C D16 SELECT 141 8D D17 PREV SCREEN 142 8E D18 NEXT SCREEN 143 8F 144 90 ================================================================= Keypad ----------------------------------------------------------------- 145 91 2 A20 0 146 92 A21 unused 147 93 A22 . 148 94 A23 ENTER 149 95 B20 1 150 96 B21 2 151 97 B22 3 152 98 C20 4 153 99 C21 5 154 9A C22 6 155 9B C23 , 156 9C D20 7 157 9D D21 8 158 9E D22 9 159 9F D23 - 160 A0 E20 PF1 161 A1 E21 PF2 162 A2 E22 PF3 163 A3 E23 PF4 164 A4 --- reserved for future use 165 A5 Page 21 ----------------------------------------------------------------- DIVISION POSITION KEYCAP KEYCODE KEYCODE (see pg 30) (dec) (hex) ----------------------------------------------------------------- ================================================================= Cursor Keys ----------------------------------------------------------------- --- reserved for future use 166 A6 7 B16 LEFT 167 A7 B18 RIGHT 168 A8 ----------------------------------------------------------------- 8 B17 DOWN 169 A9 C17 UP 170 AA A17 unused 171 AB --- reserved for future use 172 AC ================================================================= Shift, Lock, CTRL, A99 and A10 ----------------------------------------------------------------- --- reserved for future use 173 AD 6 B99,B11 SHIFT 174 AE C99 CTRL 175 AF ----------------------------------------------------------------- 5 C00 LOCK 176 B0 A99 COMPOSE 177 B1 A10 unused 178 B2 ================================================================= Special Codes ----------------------------------------------------------------- --- all ups 179 B3 --- metronome 180 B4 --- output error 181 B5 --- input error 182 B6 --- KBD LOCKED acknowledge 183 B7 --- TEST MODE acknowledge 184 B8 --- PREFIX to keys down 186 B9 --- MODE CHANGE acknowledge 185 BA --- reserved for future use 187 BB ================================================================= Delete ----------------------------------------------------------------- 3 E13 DELETE(X) 188 BC ================================================================= Return and Tab ----------------------------------------------------------------- 4 C13 RETURN 189 BD D00 TAB 190 BE Page 22 ----------------------------------------------------------------- DIVISION POSITION KEYCAP KEYCODE KEYCODE (see pg 30) (dec) (hex) ----------------------------------------------------------------- ================================================================= 48 graphics keys, space B13, D13, D99 and E99 on the main typewriter mass. ----------------------------------------------------------------- 1 E00 TILDE ` 191 BF E01 ! 1 192 C0 D01 Q 193 C1 C01 A 194 C2 B01 Z 195 C3 D99 unused 196 C4 E02 @ 2 197 C5 D02 W 198 C6 C02 S 199 C7 B02 X 200 C8 B00 > < 201 C9 E99 unused 202 CA E03 # 3 203 CB D03 E 204 CC C03 D 205 CD B03 C 206 CE 207 CF E04 $ 4 208 D0 D04 R 209 D1 C04 F 210 D2 B04 V 211 D3 A01-A09 SPACE 212 D4 213 D5 E05 % 5 214 D6 D05 T 215 D7 C05 G 216 D8 B05 B 217 D9 --- reserved for future use 218 DA E06 ^ 6 219 DB D06 Y 220 DC C06 H 221 DD B06 N 222 DE unused 223 DF E07 & 7 224 E0 D07 U 225 E1 C07 J 226 E2 B07 M 227 E3 --- reserved for future use 228 E4 E08 * 8 229 E5 D08 I 230 E6 C08 K 231 E7 B08 ,, 232 E8 unused 233 E9 E09 ( 9 234 EA D09 O 235 EB C09 L 236 EC B09 .. 237 ED unused 238 EE Page 23 ----------------------------------------------------------------- DIVISION POSITION KEYCAP KEYCODE KEYCODE (see pg 30) (dec) (hex) ----------------------------------------------------------------- 1 E10 ) 0 239 EF D10 P 240 F0 D13 unused 241 F1 C10 : ; 242 F2 B10 ? / 243 F3 unused 244 F4 E12 + = 245 F5 D12 } ] 246 F6 C12 , \ 247 F7 unused 248 F8 E11 _ - 249 F9 D11 { [ 250 FA C11 " ' 251 FB B13 unused 252 FC unused 253 FD unused 254 FE unused 255 FF Page 24 9.0 APPENDIX II - DEFAULTS The following defaults have been established regarding key transmission modes: Keyboard division Mode AR buffer assoc _________________ ____ _______________ Main Array autorepeat 0 keypad autorepeat 0 Del autorepeat 1 Return and Tab down only Function kevs down only lock,compose,A10 down only shift,ctrl down/up cursor keys autorepeat 1 6 Basic Editing Keys down only Table V Effective Rates stored in Autorepeat buffers: TIMEOUT INTERVAL _______ ________ Buffer 0: 530 ms. 30 hz Buffer 1: 300 ms. 30 hz Buffer 2: 500 ms. 40 nz Buffer 3: 300 ms. 40 hz Audio volume: Both keyclick and bell volumes will be 2 decimal (010 binary) by default. The key in position C99 of the keyboard in Appendix IV (the CTRL key in the LK201) will NOT GENERATE a click unless enabled by the terminal. The keys in position B99 and B11 (SHIFT keys on the LK201) will NEVER generate a click. Page 25 10.0 APPENDIX III - KEYBOARD MATRIX This is the current matrix for the LK200 keyboard. Keys F1-F16 and F35-F38 are not physically possible on the CT100 keyboard. For physical key locations see the bottom line in each location. Please note that the legends given are from the LK201AA as known at this time. They are provided for convenience only, and are not necessarily complete or up to date. Key positions which are non-existent on the LK201 are marked "unused". COLUMN ROW | 7 6 5 4 3 2 1 0 v ----------------------------------------------------------------- 17 |unused | F19 |unused | F20 | PF4 | N- | N, | ENTER | | | | | | | | | | | H23 | G22 | H22 | G23 | E23 | D23 | C23 | A23 | ----------------------------------------------------------------- 16 | F18 | PF3 |unused | N9 | | | N6 | N3 | N. | | | | | | v | | | | | G21 | E22 | H21 | D22 | B17 | C22 | B22 | A22 | ----------------------------------------------------------------- 15 | F17 | PF2 |unused | N8 | N5 | --> | N2 | NO | | | | | | | | | RIGHT | | G20 | E21 | H20 | D21 | C21 | B18 | B21 | A21 | ----------------------------------------------------------------- 14 | PF1 |next |remove | up | N7 | N4 | N1 | NO | | | screen| | | | | | LEFT | | E20 | D18 | E18 | C17 | D20 | C20 | B20 | A20 | ----------------------------------------------------------------- 13 |insert | _ | do |prev | { | " |unused |unused | | here| - | | screen| [ | ' | | | | E17 | E11 | G16 | D17 | D11 | C11 | B13 | A17 | ----------------------------------------------------------------- 12 | find | + | help |select | } | RETURN| <-- | | | | | = | | | ] | (bot) | | \ | | E16 | E12 | G15 | D16 | D12 | C13 | B16 | C12 | ----------------------------------------------------------------- 11 |addtnl | DELETE|unused | ) | P | RETURN| : | ? | |options| (X) | | O | | (top) | ; | / | | G14 | E13 | H14 | E10 | D10 | D13 | C10 | B10 | ----------------------------------------------------------------- 10 |unused | F12 | F14 | F13 | ( | O | L | . | | | | | | 9 | | | . | | H13 | G12 | H12 | G13 | E09 | D09 | C09 | B09 | ----------------------------------------------------------------- Page 26 COLUMN ROW | 7 6 5 4 3 2 1 0 v ----------------------------------------------------------------- 9 |unused | F11 |unused |unused | * | I | K | , | | | | | | 8 | | | , | | H11 | G11 | H10 | G10 | E08 | D08 | C08 | B08 | ----------------------------------------------------------------- 8 |unused |main |unused | exit | & | U | J | M | | | screen| | | 7 | | | | | H09 | G08 | H08 | G09 | E07 | D07 | C07 | B07 | ----------------------------------------------------------------- 7 |unused |cancel |unused |resume | ^ | Y | H | N | | | | | | 6 | | | | | H07 | G07 | H06 | G06 | E06 | D06 | C06 | B06 | ----------------------------------------------------------------- 6 |unused |unused |unused |inter- | % | T | G | B | | | | | rrupt| 5 | | | | | H05 | G04 | H04 | G05 | E05 | D05 | C05 | B05 | ----------------------------------------------------------------- 5 | setup | F5 |unused | $ | R | F | V | SPACE | | | | | 4 | | | | | | G02 | G03 | H03 | E04 | D04 | C04 | B04 |A01-A09| ----------------------------------------------------------------- 4 |unused |print |unused | break | # | E | D | C | | | screen| | | 3 | | | | | H02 | G00 | H01 | G01 | E03 | D03 | C03 | B03 | ----------------------------------------------------------------- 3 |hold | @ |unused | TAB | W | S | X | > | | screen| 2 | | | | | | < | | G99 | E02 | H00 | D00 | D02 | C02 | B02 | B00 | ----------------------------------------------------------------- 2 |unused |unused |unused | ~ | ! | Q | A | Z | | | | | ` | 1 | | | | | E99 | D99 | H99 | E00 | E01 | D01 | C01 | B01 | ----------------------------------------------------------------- 1 | CTRL | LOCK |COMPOSE|unused | | | | | | | | | | | | | | | C99 | C00 | A99 | A10 | | | | | ----------------------------------------------------------------- 0 | SHIFT | DO NOT USE THIS AREA | | | (Phantom key avoidance) | |B99,B11| | ----------------------------------------------------------------- NO of the numeric keypad is layed out such that it can be broken into two keys. Normally only the NO LEFT is implemented as a double size key. Thus; that is the code which should be considered for that double key. The interpretation of the new key formed by splitting the double key has yet to be determined. The RETURN key is also laid out so as to be able to split it into two keys. The one which is decoded as return is the RETURN (bot) key. If this key is divided the meaning of the top portion is TBD. Page 27 11.0 APPENDIX IV - KEYSWITCH LAYOUT Keyswitch Layout, page 1 of 4. ------------------------------------------------------------------> |unused |unused |unused |unused |unused |unused |unused |unused | | | | | | | | | | | H99 | H00 | H01 | H02 | H03 | H04 | H05 | H06 | ------------------------------------------------------------------> ------------------------------------------------------------------> | HOLD | PRINT | SETUP | F4 | BREAK |unused | F6 | F7 | |SCREEN |SCREEN | | | | | | | | G99 | G00 | G01 | G02 | G03 | G04 | G05 | G06 | ------------------------------------------------------------------> ------------------------------------------------------------------> | un- | ~ ` | ! 1 | @ 2 | # 3 | $ 4 | % 5 | ^ 6 | | used| | | | | | | | | E99 | E00 | E01 | E02 | E03 | E04 | E05 | E06 | ------------------------------------------------------------------- | un- | TAB | Q | W | E | R | T | y | | used| | | | | | | | | D99 | D00 | D01 | D02 | D03 | D04 | D05 | D06 | ------------------------------------------------------------------- | CTRL | LOCK | A | S | D | F | G | | | | | | | | | | C99 | C00 | C01 | C02 | C03 | C04 | C05 | ------------------------------------------------------------------> | SHIFT | > < | Z | X | C | V | B | | | | | | | | | | B99, | B00 | B01 | B02 | B03 | B04 | B05 | ------------------------------------------------------------------> | COMPOSE | SPACE | | | A99 | A01-A09 --------------------------------------------------------> Page 28 Keyswitch Layout, page 2 of 4. <-------------------------------------------------------------------- |unused |unused |unused |unused |unused |unused |unused |unused | | | | | | | | | | | H07 | H08 | H09 | H10 | H11 | H12 | H13 | H14 | <-------------------------------------------------------------------- <-------------------------------------------------------------------- | F8 | F9 | F10 |unused | F11 | F12 | F13 | F14 | | | | | | ESC | BS | LF | | | G07 | G08 | G09 | G10 | G11 | G12 | G13 | G14 | <-------------------------------------------------------------------- <-------------------------------------------------------------- | & 7 | * 8 | ( 9 | ) 0 | _ - | + = | DELETE | | | | | | | | | | E07 | E08 | E09 | E10 | E11 | E12 | E13 | <---------------------------------------------------------------- | U | I | O | P | { [ | } ] | RETURN | | | | | | | | | | D07 | D08 | D09 | D10 | D11 | D12 | D13 | --------------------------------------------------------- | | H | J | K | L | : ; | " ' | | \ | | | | | | | | | | | | C06 | C07 | C08 | C09 | C10 | C11 | C12 | C13 | ----------------------------------------------------------------- | N | M | , , | . . | ? / | SHIFT |unu| | | | | | | |sed| | B06 | B07 | B08 | B09 | B10 | B11 |B13| <---------------------------------------------------------------- SPACE | unused | | | A01-A09 | A10 | <-------------------------------------------------------- Page 29 Keyswitch Layout, page 3 of 4. ------------------------- | HELP | DO | | | | | G15 | G16 | ------------------------- ------------------------- | FIND |INSERT |REMOVE | | | HERE | | | E16 | E17 | E18 | ------------------------- |SELECT | PREV | NEXT | | | SCREEN| SCREEN| | D16 | D17 | D18 | ------------------------- | UP | | | | C17 | ------------------------- | LEFT | DOWN | RIGHT | | | | | | B16 | B17 | B18 | ------------------------- |unused | | | | A17 | --------- Page 30 Keyswitch Layout, page 4 of 4. --------------------------------- |unused |unused |unused |unused | | | | | | | H20 | H21 | H22 | H23 | --------------------------------- --------------------------------- | F17 | F18 | F19 | F20 | | | | | | | G20 | G21 | G22 | G23 | --------------------------------- --------------------------------- | PF1 | PF2 | PF3 | PF4 | | | | | | | E20 | E21 | E22 | E23 | --------------------------------- | 7 | 8 | 9 | - | | | | | | | D20 | D21 | D22 | D23 | --------------------------------- | 4 | 5 | 6 | , | | | | | | | C20 | C21 | C22 | C23 | --------------------------------- | 1 | 2 | 3 | ENTER | | | | | | | B20 | B21 | B22 | | ------------------------- | | 0 |unused | . | | | | | | | | A20 | A21 | A22 | A23 | ---------------------------------