Worth a look at
https://www.americanradiohistory.com...ay-1983-10.pdf
(Page 22) And the corrections in
https://www.americanradiohistory.com...ay-1984-03.pdf
Can be adapted for other keyboards. I connected the outputs of IC4 to the address lines of the eeprom to give me more flexible encoding. In addition the panasonic typewriter has 9 output strobes so the ninth strobe is also connected to an address line of the eeprom. This arrangement also allows characters to be mapped into multiple key presses such as shift/code with other characters. In addtion IC6 can also be omitted using the 8 data lines from the eeprom directly.
I also missed out IC2/IC3 the address comparator. Works fine.
PS. I wrote a perl program to generate the eeprom.