This is a simple adapter that allows an 8x8 matrix keyboard to be scanned by an RC2014 system. The connectors are spaced for the ZX81 5 x 8 keyboard but the other 3 lines are available and as the ZX81 headers are 2.54mm it's also possible to use it as a fairly generic interface.
ZX81 membranes keyboard replacements are available from RWAP software. An ALPS tactile switch version is available from ginger-electronics (ZX8-KDLX). It's possible to print your own top layer with a standard ASCII type layout or to use the ZX Spectrum style ZXMAX48 overlay from Tynesoft on tindie.
I've now built a second keyboard unit for my big RC2014 system and added Fuzix support to it. This works nicely and confirms the fact that the way the membrane is designed means you don't need to debounce it. I can now run the RC2014 system with TMS9918A video and the keyboard turning it from a serial based machine into a proper 8bit home computer.
One building lesson learned however. If you can put the connectors both ways around always build it both ways before concluding you didn't miss anything.
In this case the 5pin ZX81 connector is very close to the resistor pack with the connectors facing down, but fortunately if you fold the resistor pack over a bit then it all fits.
Pick the target you are building for. If you are building for the ZX81 membrane keyboard think hard about whether you want the matrix coming out of the top or bottom. If you are building for other types of keyboard then you may want to use header pins instead
Some keyboards that have a further demux on some of the lines will need 4K7 not 10K resistors.
2
Address matching
Assemble any way you fancy. I normally start with the 40pin connector and the sockets. You can build the minimal selection circuit (U1, RN1) and test that first by continually accessing the keyboard port 0xFF in software and checking pin 19 of U1.
3
Keyboard Interface
Assemble the rest of the logic and check that the expected outputs are seen. A port out to xxFF should show xx on the J2 lines.