Files
vt1200/reference/keyboard-mouse/netbsd-lk201-interface.html
T
SDD 3fd1e13b2e docs: keyboard/mouse protocol spec — LK401 (LK201 protocol) + VSXXX-AA mouse, sources, MAME lk201 device
Distils public docs into reference/keyboard-mouse/PROTOCOL.md for the level-1
Keyboard (27) / Mouse (26) device tests:
- keyboard: 4800 8N1 RS-423, self-test via FD -> 01 00 00 00 (errors 3D/3E)
- mouse: 4800 8O1 RS-232, self-test via 'T' -> 4-byte report (errors 3D/3E, >=0x20 fatal)
- separate ports: DUART2 A=keyboard, B=mouse (NOT daisy-chained)
MAME already has an LK201 device (src/mame/dec/lk201.cpp/.h) but no DEC mouse.
2026-10-16 11:38:52 +03:00

648 lines
28 KiB
HTML

<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="generator" content="Website XSL Stylesheet V2.6.0">
<link rel="home" href="../../../../." title="Welcome to The NetBSD Project: Of course it runs NetBSD.">
<link rel="up" href="../../../../docs/Hardware/Machines/." title="Hardware Documentation - Machines">
<link rel="previous" href="../../../../docs/Hardware/Machines/ARC/." title="Advanced RISC Computing (ARC) Specification for the Advanced Computing Environment (ACE)">
<link rel="next" href="../../../../docs/Hardware/Machines/DEC/lk201_keycodes.html" title="LK201 Keycodes and Keyboard Divisions">
<link rel="first" href="../../../../docs/Hardware/Machines/ARC/." title="Advanced RISC Computing (ARC) Specification for the Advanced Computing Environment (ACE)">
<link rel="last" href="../../../../docs/Hardware/Machines/DEC/vax/." title="Hardware Documentation - Machines DEC - VAX hardware reference">
<link rel="stylesheet" href="../../../../global.css" type="text/css">
<link rel="stylesheet" href="../../../../donations/thermo/fundraiser.css" type="text/css">
<title>LK201 Interface</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0">
</head>
<body class="website"><div class="webpage" id="docs-Hardware-Machines-DEC-lk201">
<div id="top"><a href="#mainContent" id="skiplink" tabindex="1">Skip to main content.</a></div>
<input id="hamburger" type="checkbox"><label class="menuicon" for="hamburger"><span></span><span></span><span></span></label><div id="navBar" role="navigation">
<div id="centralHeader"><div id="logo">
<a href="../../../../"><img id="projectLogo" alt="" height="120" src="../../../../images/NetBSD-smaller-tb.png"></a><a href="/"><div id="fundraiser">
<br><div id="fundraiser-amount"><div id="fundraiser-raised"></div></div>
</div></a>
</div></div>
<span class="doNotDisplay">
Navigation:
</span><ul>
<li>
<a href="../../../../">
Home</a><ul>
<li><a href="../../../../changes/">
Recent changes</a></li>
<li><a href="//blog.NetBSD.org/">
NetBSD blog</a></li>
<li><a href="../../../../gallery/presentations/">
Presentations</a></li>
</ul>
</li>
<li>
<a href="../../../../about/">
About</a><ul>
<li><a href="../../../../people/developers.html">
Developers</a></li>
<li><a href="../../../../gallery/">
Gallery</a></li>
<li><a href="//wiki.NetBSD.org/ports/">
Ports</a></li>
<li><a href="//www.pkgsrc.org/">
Packages</a></li>
</ul>
</li>
<li>
<a href="../../../../docs/">
Documentation</a><ul>
<li><a href="../../../../docs/misc/index.html">
FAQ &amp; HOWTOs</a></li>
<li><a href="../../../../docs/guide/en/">
The Guide</a></li>
<li><a href="//man.NetBSD.org/">
Manual pages</a></li>
<li><a href="//wiki.NetBSD.org/">
Wiki</a></li>
</ul>
</li>
<li>
<a href="../../../../support/">
Support</a><ul>
<li><a href="/community/">
Community</a></li>
<li><a href="/mailinglists/">
Mailing lists</a></li>
<li><a href="../../../../support/send-pr.html">
Bug reports</a></li>
<li><a href="../../../../support/security/">
Security</a></li>
</ul>
</li>
<li>
<a href="../../../../developers/">
Developers</a><ul>
<li><a href="//cvsweb.NetBSD.org/">
CVSWeb</a></li>
<li><a href="//anonhg.NetBSD.org/">
Mercurial</a></li>
<li><a href="//nxr.NetBSD.org/">
Cross-reference</a></li>
<li><a href="//releng.NetBSD.org/">
Release engineering</a></li>
<li><a href="//wiki.NetBSD.org/projects/">
Projects list</a></li>
</ul>
</li>
</ul>
</div>
<div id="content"><div id="mainContent" class="fullWidth"><div class="rowOfBoxes">
<h1>LK201 Interface</h1>
<h2 class="title">LK201 Keyboard Interface</h2>
<h3 class="title">Overview</h3>
<ul><li><a href="#introduction">Introduction and Purpose</a></li></ul>
<h3 class="title">Electrical Interface</h3>
<ul>
<li><a href="#electrical">Electrical Specifications</a></li>
<li><a href="#pinout">Connector Pinout</a></li>
</ul>
<h3 class="title">Communications from the Keyboard to the Computer</h3>
<ul>
<li><a href="#lk2dec">Overview</a></li>
<li><a href="#kbdmodes">Keyboard Modes</a></li>
</ul>
<h3 class="title">Communications from the Computer to the Keyboard</h3>
<ul>
<li><a href="#dec2lk">Overview</a></li>
<li><a href="#led_control">LED Control</a></li>
<li><a href="#click_control">Key Click Control</a></li>
<li><a href="#bell_control"> Bell Control</a></li>
<li><a href="#key_control">Key Control</a></li>
<li><a href="#ar_control">Autorepeat Control</a></li>
<li><a href="#power_up">Power-Up and Self Test</a></li>
</ul>
<h3 class="title">References</h3>
<ul><li><a href="#references"> Sources of this Information</a></li></ul>
<h3 class="title">DISCLAIMER</h3>
<ul><li><a href="#nosmoke">No Fault</a></li></ul>
<hr>
<h3 class="title">Overview</h3>
<h4 class="title" id="introduction">Introduction and Purpose</h4>
<p>This page is intended to detail the DEC LK201 keyboard interface.
If anything on this page is unclear or incorrect, please contact <a class="ulink" href="mailto:dmcmahill@NetBSD.org" target="_top">me</a> and I will do my best to
clarify and/or correct the document.</p>
<hr>
<h3 class="title">Electrical Interface</h3>
<h4 class="title" id="electrical">Electrical Specifications</h4>
<p>This section describes the electrical interface between the LK201
Keyboard and the computer. Some of these specifications came from
publication EK-366AA-OG-002 "DECstation 5000, Model 200 Hardware
Operator's Guide, April 1990". The rest of the items in this section
were experimentally determined (like the pin outs).</p>
<p>The LK201 is powered from a 12 Volt supply generated by the
computer. The keyboard and the computer communicate via a fairly
standard serial interface. The key specifications are listed
here:</p>
<div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: disc; ">
<li class="listitem">Bidirectional asynchronous serial communication: 4800 baud, 8N1.</li>
<li class="listitem">Serial interface levels: EIA RS 423 (ie signals swing +/- 5 Volts).</li>
<li class="listitem">Power input: 4.2 Watts Max. 350 mA @ 11.8 Volts +/- 6%. (NOTE: This is the
value quoted in the manual, but I measured 30 mA on a working LK201.
Perhaps the 350 mA is the maximum the computer can supply?)</li>
</ul></div>
<h4 class="title" id="pinout">Connector Pinout</h4>
<p>The pinout of the connector on the LK201 and on the computer in jpeg and
postscript form are linked below.</p>
<div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: disc; ">
<li class="listitem"><a class="ulink" href="LK201_connector.jpg" target="_top">LK201 Connector Diagram (jpeg 29k)</a></li>
<li class="listitem"><a class="ulink" href="LK201_connector.ps" target="_top">LK201 Connector Diagram (postscript 12k)</a></li>
</ul></div>
<pre class="programlisting">
|----- data -&lt; -------------------------------------------|
| |-------- &gt;- Power -----------------------------| |
| | |------------- GND -------------------| | |
| | | |------------- &lt;- data -----| | | |
------------------- -------------------
| " " " " | | " " " " |
| L V G D | | D G V L |
| K + N E | | E N + K |
| -&gt; D C | | C D -&gt; |
| D -&gt; | | -&gt; D |
| E L | | L E |
| C K | | K C |
-- -- -- --
| | | |
-- -- -- --
| | | |
------- -------
Looking into the Looking into the DECstation
LK201 Connector Connector
(Socket on keyboard) (Socket on DECstation)
</pre>
<hr>
<h3 class="title">Communications from the Keyboard to the Computer</h3>
<h4 class="title" id="lk2dec">Overview</h4>
<p>The next two sections will refer to the following table and/or
diagram:</p>
<div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: disc; ">
<li class="listitem"><a class="ulink" href="lk201_keycodes.html" target="_top">LK201 Keycode and Keyboard Division Table (html)</a></li>
<li class="listitem"><a class="ulink" href="LK201_large_keycodes.jpg" target="_top">LK201 Keycode and Keyboard Division Chart (in color) (jpg 67k)</a></li>
<li class="listitem"><a class="ulink" href="LK201_keycode.ps" target="_top">LK201 Keycode and Keyboard Division Chart (postscript 136k)</a></li>
</ul></div>
<p>(I had a hard time getting a jpeg version which was legible so
please bear with me on the postscript format for now.)</p>
<h4 class="title" id="kbdmodes">Keyboard Modes</h4>
<p>The LK201 keyboard has its keys divided into 14 distinct groups.
These groups are indicated on the <a class="ulink" href="#lk2dec" target="_top">LK201 Keycode
and Keyboard Division Chart/Table</a>. Each of the groups is
separately programmed for its behaviour with respect to keycode
generation. There are three operating modes to select from.</p>
<div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: disc; ">
<li class="listitem">
<code class="code">LK_DOWN</code> mode: In this mode, the code indicated on the keycode chart
is transmitted by the keyboard when the corresponding key is pressed. If held
down, the key does <span class="emphasis"><em>not</em></span> repeat and no further codes are generated.</li>
<li class="listitem">
<code class="code">LK_AUTODOWN</code> mode: In this mode, the code indicated on the keycode chart
is transmitted by the keyboard when the corresponding key is pressed. If held down
the LK201 transmits the <code class="code">LK_REPEAT</code> value, <code class="code">0xB4</code>,repeatedly
at the key repeat rate. It is up to the computer to know what key is being
repeated.</li>
<li class="listitem">
<code class="code">LK_UPDOWN</code> mode: In this mode, the code indicated on the keycode chart
is transmitted by the keyboard when the corresponding key is pressed. In addition,
a code is generated when the key is released. The release code is determined by the
following rule. If no other keys in <code class="code">LK_UPDOWN</code> mode are pressed in addition
to the one being released, the <code class="code">LK_ALLUP</code>, <code class="code">0xB3</code> is generated.
If there is another key currently pressed which has been programmed for
<code class="code">LK_UPDOWN</code> mode, the code indicated on the keycode chart is used for
the key release code. If held, the key does <span class="emphasis"><em>not</em></span> repeat.
<code class="code">LK_UPDOWN</code> mode is used for keys such as <span class="emphasis"><em>SHIFT</em></span>, and
<span class="emphasis"><em>CONTROL</em></span>. The computer recognizes that the <span class="emphasis"><em>SHIFT</em></span> (or other
"modifying" key) has been pressed and not released. In this manner, the computer
knows to use the shifted character set. Once released, the computer sees the
release code and switches back to the normal character set.</li>
</ul></div>
<hr>
<h3 class="title">Communications from the Computer to the Keyboard</h3>
<h4 class="title" id="dec2lk">Overview</h4>
<p>The LK201 accepts a handful of commands from the computer. These
commands include programming the operational mode of each of the 14
groups of keys, control of the 4 LED's, control of the bell, and control
of keyclicks.</p>
<p>Commands are send to the keyboard as either single byte commands
or as a command byte followed by one data byte. Once again, the
communication is 4800 baud serial.</p>
<h4 class="title" id="led_control">LED Control</h4>
<p>The 4 LED's on the LK201 are controlled by the computer.
Either the command <code class="code">LK_LED_ENABLE</code> or
<code class="code">LK_LED_DISABLE</code> is sent followed by 1 byte
which indicates which of the 4 LED's are affected. The
lower 4 bits of the data byte correspond to the 4 LED's.
For example, to turn on the caps lock LED, the following
two bytes would be sent:</p>
<code class="code">
LK_LED_ENABLE LED_LOCK
</code>
<p>A sample code fragment which defines the LED control codes
is shown here.</p>
<pre class="programlisting">
/* requires LED number data */
#define LK_LED_ENABLE 0x13 /* light LED */
#define LK_LED_DISABLE 0x11 /* turn off LED */
#define LED_WAIT 0x81 /* Wait LED */
#define LED_COMP 0x82 /* Compose LED */
#define LED_LOCK 0x84 /* Lock LED */
#define LED_HOLD 0x88 /* Hold Screen LED */
#define LED_ALL 0x8F /* All LED's */
</pre>
<h4 class="title" id="click_control">Key Click Control</h4>
<p>The LK201 accepts several commands relating to key clicks.</p>
<pre class="programlisting">
/* Requires volume data byte */
#define LK_CL_ENABLE 0x1B /* keyclick enable. Requires volume */
/* byte. This does not affect the */
/* SHIFT key. The CTRL key requires */
/* LK_CL_ENABLE and LK_CCL_ENABLE to */
/* have been sent before it clicks. */
/* All other keys are only controlled */
/* by LK_CL_ENABLE. */
#define LK_CCL_ENABLE 0xBB /* Enable keyclicks for the CTRL key. */
/* The CTRL keyclick volume is set to */
/* be the same as the rest of the keys */
/* LK_CCL_ENABLE sets a flag in the */
/* keyboard with is logically AND'ed */
/* with the LK_CL_ENABLE flag to enable*/
/* CTRL key keyclicks. */
#define LK_CL_DISABLE 0x99 /* keyclick disable */
#define LK_CCL_DISABLE 0xB9 /* CTRL key keyclick disable */
#define LK_SOUND_CLICK 0x9F /* causes the LK201 to sound a keyclick*/
/* max volume is 0, lowest is 0x7 */
#define LK_PARAM_VOLUME(v) (0x80|((v)&amp;0x7))
</pre>
<p>For example, to enable keyclicks at full volume, the following data would
be sent to the keyboard:</p>
<code class="code">
LK_CL_ENABLE LK_PARAM_VOLUME(0x00)
</code>
<h4 class="title" id="bell_control"> Bell Control</h4>
<p>The keyboard bell control commands work in the same manner as the keyclick
commands. The keyboard never generates a bell sound on its own. A bell
sound is always at the command of the computer.</p>
<pre class="programlisting">
/* requires bell volume data */
#define LK_BELL_ENABLE 0x23 /* enable the keyboard bell. Requires */
/* volume data byte. */
#define LK_BELL_DISABLE 0xA1 /* disable the keyboard bell. */
#define LK_RING_BELL 0xA7 /* ring the keyboard bell */
/* max volume is 0, lowest is 0x7 */
#define LK_PARAM_VOLUME(v) (0x80|((v)&amp;0x7))
</pre>
<h4 class="title" id="key_control">Key Control</h4>
<p>The LK201 provides 3 different operating modes for the keys. In
addition, the keyboard is divided into 14 different groups which
are shown in the
<a class="ulink" href="LK201_keycode.ps" target="_top">LK201 Keycode and Keyboard Division Chart (postscript 136k)</a>
and also in the
<a class="ulink" href="lk201_keycodes.html" target="_top">LK201 Keycode and Keyboard Division Table (html)</a>.
The three operating modes are discussed in
<a class="ulink" href="#lk2dec" target="_top">2. Communications from the Keyboard to the Computer</a>.</p>
<p>Programming of the keyboard mode is accomplished via 1 byte per group of keys
on the keyboard. The macro <code class="code">LK_CMD_MODE()</code> is used to form the
command. For example, to set division 2 (the numeric keypad) to LK_AUTODOWN mode,
we would transmit:</p>
<code class="code">LK_CMD_MODE(LK_AUTODOWN,2)</code>
<p>Upon successful receipt of the command, the LK201 responds with
<code class="code">LK_MODECHG_ACK</code>. The macros and constants used for key mode
programming are listed below.</p>
<p>The details of the meaning of each bit in the mode command are
listed below.</p>
<pre class="programlisting">
bit 7: PARAM bit.
1 = no parameter to follow
0 = parameter will follow
bits 3-6: keyboard division
bits 1-2: mode (00 = down, 01=autodown, 11=updown)
bit 0: "type" don't know what that means, but should be set to 0.
</pre>
<p>In the examples below, the PARAM bit is set to 1 meaning that no
parameter will follow.</p>
<pre class="programlisting">
#define LK_UPDOWN 0x86
#define LK_AUTODOWN 0x82
#define LK_DOWN 0x80
#define LK_CMD_MODE(m,div) ((m)|((div)&lt;&lt;3))
#define LK_MODECHG_ACK 0xBA /* sent by the keyboard to acknowledge a */
/* successful mode change. */
#define LK_PFX_KEYDOWN 0xB9 /* indicates that the next byte is a key- */
/* code for a key already down in a */
/* division that has been changed to */
/* LK_UPDOWN. I think this means that if */
/* for example, the 'a' key is in LK_DOWN */
/* mode and the key is being held down and*/
/* division 1 is switched to LK_UPDOWN */
/* mode, the keyboard will produce the */
/* byte LK_PFX_KEYDOWN followed by 0xC2 */
/* (KEY_A). */
#define LK_CMD_RPT_TO_DOWN 0xD9 /* This command causes all divisions which */
/* are programmed for LK_AUTODOWN mode to */
/* be switched to LK_DOWN mode. */
#define LK_CMD_ENB_RPT 0xE3 /* enables auto repeat on the keys */
/* which are in LK_AUTODOWN mode */
#define LK_CMD_DIS_RPT 0xE1 /* disables auto repeat on all keys, but */
/* does not change the mode that the */
/* divisions are programmed to. */
#define LK_CMD_TMP_NORPT 0xD1 /* temporary auto repeat disable. This */
/* command disables auto repeat for the key*/
/* which is currently pressed down. Auto */
/* repeat is re-enabled when another key is*/
/* pressed. */
#define LK_INPUT_ERROR 0xB6 /* sent by the keyboard if it receives an */
/* invalid command. */
</pre>
<p>The LK201 contains 4 autorepeat registers. Each autorepeat
register controls how quickly keys repeat and if repeating is enabled.
The 4 autorepeat registers are independent. Each keyboard division can
be associated with 1 of the 4 registers. To associate a keyboard
division with a particular autorepeat register, use the same command as
setting the key division mode except set the PARAM bit to 0 and send a
second byte which controls which autorepeat register is selected. The
format of the second byte is:</p>
<pre class="programlisting">
bit7: 1
bits 2-6: 0
bits 0-1: number of the autorepeat register 00,01,10,11
</pre>
<p>For example, to set division 2 (the numeric keypad) to LK_AUTODOWN
mode, and associate it with autorepeat register number 2, we would
transmit: <code class="code">LK_CMD_MODE_AR(LK_AUTODOWN,2) 0x82</code> where the
macro <code class="code">LK_CMD_MODE_AR</code> is defined below.</p>
<pre class="programlisting">
#define LK_CMD_MODE_AR(m,div,arreg) (0x7F &amp; ((m)|((div)&lt;&lt;3)) )
</pre>
<h4 class="title" id="ar_control">Autorepeat Control</h4>
<p>The autorepeat rate is programmed by a 3 byte command.</p>
<pre class="programlisting">
first byte:
bit7: 0 (means more bytes to come after this one)
bits 3-6: 1 (means we're calling the rate change command)
bits 1-2: number of autorepeat register (00,01,10,11)
bit 0: "type" set to 0
second byte:
bit7: 0 (more bytes to come after this one)
bits0-6: time out value (how long to wait before beginning to autorepeat)
this is in 5 ms increments. allowed range is 5 ms-630 ms.
note: don't send 635ms, 0111 1111 is a reserved for internal use code.
note: don't send 0ms, 0000 0000 is illegal.
third byte:
bit7: 1 (no more bytes after this one)
bits0-6: autorepeat rate in number of generated key presses/second.
lowest rate is 12 Hz.
note: 125Hz (1111 1101) must not be sent (its identical to the powerup
command)
</pre>
<h4 class="title" id="power_up">Power-Up and Self Test</h4>
<p>This section details the self test features and the power up
sequence of the keyboard. Upon power-up, the keyboard performs a self
test in 70 ms or less. The results are sent to the computer. The
power-up self test results consist of 4 bytes.</p>
<pre class="programlisting">
Byte 1: Keyboard ID stored in the keyboard firmware. On
my LK201, this is 0x01.
Byte 2: Keyboard ID read from hardware jumpers. The documentation
I have doesn't seem to quite match my keyboard (the docs say
that the keyboard uses an 8051 microcontroller while mine
uses a 68HC05C4). Anyway, the docs and my keyboard both say
the result is 0x00.
Byte 3: Error code. This byte indicates the result of the self test.
Possible values are:
0x00 No Error
#define LK_KDOWN_ERROR 0x3D /* Key down on powerup error */
#define LK_POWER_ERROR 0x3E /* Keyboard failure on pwrup tst */
Byte 4: Keycode. This byte contains the keycode of which key (if any)
was pressed down on powerup. If no keys were pressed, this
byte is 0x00.
</pre>
<p>If the keyboard passes all power up tests with no error, the resulting
sequence sent to the computer is:</p>
<pre class="programlisting">0x01 0x00 0x00 0x00 </pre>
<p>If the keyboard finds a key down on the first scan, it continues
to look for an all up condition. When all keys are released, the
keyboard transmits the correct 4 byte sequence (0x01 0x00 0x00
0x00).</p>
<p>Additional test commands are listed below.</p>
<pre class="programlisting">
#define LK_CMD_POWER_UP 0xFD /* This command initiates the keyboard */
/* power up sequence. */
#define LK_CMD_REQ_ID 0xAB /* This command requests the 2 byte */
/* keyboard ID. The keyboard responds */
/* with the same Byte1 and Byte2 as in */
/* the power up self test. */
#define LK_CMD_SET_DEFAULTS 0xD3 /* Restores the keyboard to its default */
/* state. This command sets the: */
/* division mode settings, */
/* auto-repeat interval and timeout rate, */
/* auto-repeat buffer selections, */
/* audio volume, */
/* ctrl key keyclick setting, */
/* to their power up defaults. */
#define LK_CMD_TEST_MODE 0xCB /* causes the keyboard to enter the */
/* factory test mode. This command */
/* should not be used. If received, the */
/* keyboard responds with LK_TESTMODE_ACK */
/* By sending a 0x80, the keyboard will */
/* leave factory test mode and jump to the*/
/* power up sequence. */
#define LK_TESTMODE_ACK 0xB8 /* sent by the keyboard in response to */
/* the LK_CMD_TEST_MODE command. */
</pre>
<p>The following are some additional keyboard
control commands which didn't seem to fit anywhere else.</p>
<pre class="programlisting">
#define LK_CMD_INHIBIT 0xB9 /* This command suspends transmission */
/* the keyboard to the computer. The */
/* keyboard responds with LK_KBDLOCK_ACK */
/* and turns on the LOCK LED. */
#define LK_KDBLOCK_ACK 0xB7 /* send by the keyboard in response to */
/* the LK_CMD_INHIBIT command. */
#define LK_CMD_RESUME 0x8B /* Resumes normal keyboard operation after*/
/* the LK_CMD_INHIBIT command. */
#define LK_OUTPUT_ERROR 0xB5 /* If any keystrokes were lost while the */
/* keyboard was locked (LK_CMD_INHIBIT), */
/* then LK_OUTPUT_ERROR is generated by */
/* the keyboard when LK_CMD_RESUME is */
/* received. */
</pre>
<hr>
<h3 class="title">References</h3>
<h4 class="title" id="references"> Sources of this Information</h4>
<p>Much of this information came from NetBSD sources from mid-March,
1998. In particular, the files <code class="code">lk201.h</code> and
<code class="code">lk201.c</code> from <code class="code">src/sys/arch/pmax/dev/</code> is the
source of most of the code fragments on this page. Additional hints
came from the X11R5 Xserver code for <a class="ulink" href="http://www.openbsd.org" target="_top">OpenBSD</a> (I think the OpenBSD and
NetBSD Xserver's are largely the same, at least with respect to the
keyboard stuff). I also got some good hints and a few
<code class="code">#define</code>'s from an unknown version of Mach from Carnegie
Mellon. The files in the Mach source I looked at were also called
<code class="code">lk201.h</code> and <code class="code">lk201.c</code>, but were not the same as
the NetBSD files of the same names.</p>
<p>In addition to poking around the various pieces of code mentioned
above, I hooked an LK201 up to the serial port on a NetBSD/mac68k
machine and spent some time experimenting with the keyboard and the
various control sequences. This is how I convinced myself of what the
14 keyboard divisions are. This test setup was invaluable for seeing
exactly what the keyboard produces and how it reacts to known
commands.</p>
<p>The text version of the keycodes and keyboard divisions was sent
to me by <a class="ulink" href="mailto:djv@bedford.net" target="_top">Dave</a>. My brother,
<a class="ulink" href="http://www.cs.cmu.edu/~jmcm/" target="_top">Jeff</a>, was also a big
help in answering many <code class="code">C</code> questions and pointing me towards
the Mach code.</p>
<p>In addition, I got a copy rather late in the writing of this page
of what could be considered the "real" document for all this stuff.
"VCB02 Video Subsystem Technical Manual" DEC Educational Services,
AZ-GLGAB-MN, February 1986 The appendix of this document cleaned out
most of the remaining mysteries.</p>
<hr>
<h3 class="title">DISCLAIMER</h3>
<h4 class="title" id="nosmoke">No Fault</h4>
<p>Any software and documentation here is provided "as is", no
warranty, use at your own risk. Please do not hook up your LK201 and/or
computer backwards and blame me!</p>
</div></div></div>
<div class="navfoot"></div>
<div id="footer"><div id="footerContent">
<span class="footfeed"><a href="//www.NetBSD.org/cgi-bin/feedback.cgi">
Contact</a> |
</span><span class="footcopy"><a href="../../../../about/disclaimer.html">
Disclaimer</a> |
<span class="copyright">Copyright © 1994-2026 The NetBSD Foundation, Inc. </span>ALL RIGHTS RESERVED.<br>NetBSD<sup>®</sup> is a registered trademark of The NetBSD
Foundation, Inc.</span>
</div></div>
</div></body>
</html>