The TRS80 Keyboard

The TRS80 reads the keyboard data from the memory map, as 8 rows of 8 columns.
It works in a very similar way as the ZX81, with A0-7 driving rows 0-to 7, and D0-7 reading columns 0-7.
Characters that may cause trouble due to PS/2 keyboard incompatibilities are coloured red.
The TRS80 does not have lower case characters.
Purple cells indicates the pin numbers of connector to the keyboard PCB.
Yellow cells indicate main differences with the Tandy Color Computer keyboard matrix.

Row   Data
    7 6 5 4 3 2 1 0  
0   G F E D C B A @ 5
1   O N M L K J I H 4
2   W V U T S R Q P 6
3             Z Y X 9
4   / & % $ # " ! 0 2
  7 6 5 4 3 2 1
5   ? > = < + * ) ( 3
/ . _ , ; : 9 8
6   ENTER CLR BRK UP DN LEFT RIGHT SP 7
7   shift
L & R
              8
    17 15 12 18 13 10 16 11  
 
1   +5V
19   GND

PS/2 Scan code to TRS80 Matrix conversion

PC
kbd
--> PS/2
interface
-scan-code-> FIFO -> TRS80 Keyboard
Matrix Encoder
<-- 8-bit row addr (A7-0)
--> 8-bit row data (D7-0)
TRS80
           
<--