


				KBD V1.4a
			       ===========



	KBD is a software-driver that allows you to connect a DEC LK201 
	keyboard to your Atari ST (with TOS 1.4 in ROM).
	You can do this through the RS232-interface without hardware-
	extensions or -modifications to the ST. There is even no need to 
	open it.

	The idea and the kernel algorithm were first implemented from 
	Mark Boyd in his DECKEY-program. Because of some TOS-dependent, 
	hardcoded addresses (one of them is mandatory) it doesn't work 
	with TOS 1.4.
	Since the assembler-source is difficult to mantain and extend, 
	I decided to rewrite it in 'C' with some additional features.
.	
	Similar to DECKEY KBD is an interrupt-driven program which reads
	LK201-scancodes from the serial port, converts them into ST-scan-
	codes and gives them to the OS as if they were sent from the original 
	keyboard. It also handles the shift-register.






	Special thanks to:

	    - Mark Boyd for his idea and algorithm
	    - Noud van Kruysbergen for the idea of monitoring disk I/O
	      by 'bending' the RWABS-vector.
	    - Jeff Lomicka for the codes to activate the lamps on the LK201.





	1 Installation:

	  1.1 Hardware
	    
	    Mark Boyd: "The RJ11 ( standard modular telephone connector ) 
		 plug on the DEC keyboard has four wires. They are color 
		 coded black, red, green, and yellow. The red wire supplies 
		 power ( +12 V.  ) to the keyboard. It should be connected 
		 to the positive side of the power supply. The green wire is 
		 ground for both the power supply and the communications lines.
		 It must be connnected to the negative side of the power 
		 supply. The black wire is the RS-423 output from the keyboard.
		 ... 
		 I used an RJ11 to DB25 adapter that looks like an oversized 
		 DB25 shell. Our computer center uses them for all our 
		 terminals so that they can use RJ11 wall jacks. I brought 
		 the power wires in through a small hole that I melted in 
		 the shell, and did all the wiring inside. 
		 ...
		 I connected the pins for 3 (black wire from keyboard) and  7 
		 ( green wire from keyboard and power supply negative lead ). 
		 ...
		 The power supply requirement is 200ma. at 12 V.  The voltage 
		 is regulated internally so it isn't very critical. A range 
		 from 10 V. to 15 V. seems OK, although you might have 
		 internal heat problems in the keyboard at the upper end of 
		 that range. Suitable wall transformer type supplies are 
		 available for less than $10.  Since I'm not going to buy a
		 Mega ST, my ST's power supply will have to handle 4 mega-
		 bytes of memory in the near future. I didn't want to further 
		 load the ST's already marginal power supply with the extra 
		 keyboard."


	    This is for DECKEY. For KBD you have to connect the yellow wire
	    as well in order to send output to the keyboard (switch on and off 
	    the indicators, sound bell). Connect it to pin 2.

	  1.2 Software
            
	    If you have plugged your keyboard into the ST just run KBD.PRG.
	    A dialogbox will appear which asks you if you want to install KBD. 
	    Test your keyboard and if you like it copy KBD.PRG into your 
	    AUTO-folder. (The dialog box won't appear during boot-time.)
	    To deactivate KBD just run it again and click to the "Remove"-
	    button of the dialogbox.


	    NOTE: It is impossible to deactivate KBD when other programs 
		  that MODIFY the RS232-rcv-buf-full vector AND that do 
		  not support XBRA-protocol have been installed AFTER KBD.
		  In such unlikely case KBD cannot check whether it is already 
		  installed. Therefore a dialogbox will appear indicating
		  that the "XBRA-chain is interrupted" and it will ask you 
		  whether to install KBD or to quit.
		  To avoid this, make sure that those programs are installed
		  before KBD. Look for the PHYSICAL order of the corres-
		  ponding files in your AUTO-folder. When installing KBD
		  after those programs the warning mentioned above will
		  appear too, don't worry in this case it is only informational.

		    
		    
	2 Keyboard-Layout

	  The LK201-keyboard layout is very similar to the ST's.
	  The only problems are that it has no ESC-key and no Alternate-key.
	  I put ESC to <F11> and Alternate to <Compose Character> which is
	  in the same position as the Alt-key on the ST-keyboard.
	  
	  <Compose Character> does not send a key-release code like <Shift>
	  or <Ctrl> do, therefore it only affects the next key-stroke. 
	  You don't even have to hold down the 'ALT'-key when hitting the 
	  next key. 

	  The function keys (<F1>-<F10>) behave as usual except that the
	  "Little Green Selectorbox" and maybe few other programs also 
	  don't accept them. (The rest of my software does.)

	  <Help> is mapped to the ST-<Help>-key.

	  <Do> and <F20> have a special meaning which is mentioned 
	  in the next chapter.

	  The area above the cursor keys is defined as follows:

	
	    +--------+--------+--------+
            |        |        |        |
	    | Help   | Insert | Delete |
            |        |        |        |
	    +--------+--------+--------+
            |        |        |        |
	    |'Select'| Undo   | Cls    |
            |        |        |        |
	    +--------+--------+--------+


	  The <Select>-key is mapped to keypad-period and therefore only 
	  useful within the EDT-clone SEDT.



	3 Features

	  3.1 Indicators
	  
	    Above the <Help>- and <Do>-key there are 4 lamps with the 
	    following meaning:

	    <Learn in progress> <Capslock> <Alternate> <any disk I/O>

	  3.2 Programmable Key

	    KBD can store a sequence of key-strokes and repeat it afterwards.
	    In order to do so just press <Do> while holding <Shift> down,
	    the <Learn in Progress>-lamp will be activated.
	    Every key you type now will be recorded until you hit <DO> again.
	    (The <Learn in Progress>-lamp will be deactivated.)
	    When you hit <Do> for the third time the recorded keys come up
	    again.
	    When you hit <Shift><Do> while the <Learn in Progress> lamp is 
	    lit the learn-buffer will be reset.

	    Due to internal problems the learn-buffer is limited to hold 
	    maximum 9 keystrokes. When the keyboard (!) starts beeping
	    you have exceeded the limit.

	  3.3 Seperate Bootkey

	    Since there is no delete key on an LK201 I defined a seperate 
	    boot key (<F20>). 
	    Its internal representation is <Ctrl><Alt><Shift><Delete>.


Bert Oberholz, 04-Mar-1990

SUOSWS::OBERHOLZ

oberholz@suosws.enet.dec.com

