Like so many cool-looking keyboards from that period, it's foam and foil. But it still seemed worth getting, even though the first step would be dealing with that. Time has also taken a toll on the cable, which is several meters(!) long terminating in a DIN-5: the plasticizers have broken down making it sticky and prone to picking up dog fur off the floor.The 4120's user-friendly keyboard features numeric keypads, thumbwheels for graphic input, eight dedicated programmable function keys, ports for joystick and mouse, and a complete easy-to-use viewing system implemented from the keyboard.
The function key switches (not including the numpad) have much heavier springs. These were clearly internded for high-level functions and not rapid interaction like navigation.
There was some speculation that the f&f would be BTC. But, no, it's Keytronic. With all the keyboard has to do, some of the engineering is more complex than usual for keyboards of this period.
The controller is an MCS-51, specifically, an 8031, which needs external program ROM. That's convenient because the PROM can be pulled out and disasembled. This keyboard has rev 191-2716. The keys are scanned with the aid of a couple of custom chips, 22-00950-001 and 22-908-03A. The latter presents a parallel interface to Port 1 with strobe on P3.3, more or less exactly as in the patent that is conveniently cited on the PCB.
The thirteen LEDs need more pins and more power than can be handled directly by the MCU. They are connected to a couple of addressable high-current latches, NE5090, which are normally used to drive relays. The address and state lines come from Port 0. The control line comes from one of the outputs of a dual 2-to-4 demux, whose two selector lines come from P3.4 and P3.5. The two gates for the demux are WR and RD. All of which means that the MOVX instruction, which was designed for accessing external RAM, can be used to implement a primitive 8-position bus with common data lines (that are also shared with addresses to the PROM).
The other signals from the demux go to clock lines of various flip-flops for other parts of the system, such as, I believe, the joystick (I don't have one).
Port 2 seems to only be used for the high address bits of the external program memory.
The 8051 has a built-in serial interface, which uses two more pins on Port 3. RxD comes from one of the wires of the DIN-5 connector, after being inverted twice by a NAND gate with Schmitt triggers to clean up the edges. TxD goes to another DIN pin, after begin inverted twice by a 7406.
The power line goes to two(!) 5V regulators, so it needs around 12V with a decent amount of current.
That is enough to build a converter board. After power-on / reset, all LEDs are on; the terminal needs to turn them off.
Nothing shows up on the serial port for a straightforward sketch. That is because the from-keyboard line, which is being held at idle-high by the keyboard end, is floating after going through the inverter. Open collector serial isn't really a thing: a pull-up is needed. Fortunately, turning on the internal one for PD2 just works on the Teensy AVR.
The serial communication is 1200 baud and the keyboard sends unique up and down key transitions, which is ideal, even separate codes for the two shift keys.
The to-keyboard protocol includes a single byte code to turn off all LEDs, as is perfect for right after power-up. And another to turn them all back on, which I suppose gives a way of attracting the user's attention by flashing them all quickly. There are also codes to turn on and off individual LEDs. The protocol numbers for those don't have any recognizable order. And the protocol allows for thirty-two of them, which is a bit weird.
Turning on a fourteenth LED by sending the highest possible code (31) actually drives a 555 timer connected to the speaker to play a tone. Even though that's a lot of hardware for this, there does not appear to be any way to change the note. And this keyboard seems to be too late for the craze of boards with linear switches playing clicky sounds.
I did not have anything very useful to do with all the indicator LEDs, so in the QMK default, I just made the four on the right light up when the key above them is pressed.
It's disappointing, but I have not yet had any luck getting the thumbwheels to do anything. I may need to take them out to connect to a scope. I imagine that they are simple rotary encoders with physical contacts for quadrature output as CLK and DT. The outputs go to a quad NAND gate. When I got the keyboard, they were disconnected. It's possible to connect the four-pin cable backwards; there is just a little arrow indicating where the pin 1 end goes. But I do not believe anything permanently bad results from that, even though it reverses power and ground. The signal outputs just don't make sense. It's also possible that the contacts have corroded, although they seem to be sealed inside the wheel.