The Tandy Color Computer Keyboard

The CoCo reads the keyboard data from the memory map, as 8 rows of 8 columns.
The 6821 PIA chip PA0-7 connect to the rows 0-to 7, and PB0-7 connect to columns 0-7.
Characters that may cause trouble due to PS/2 keyboard incompatibilities are coloured red.
The CoCo does not have lower case characters.
The CoCo matrix is similar to the TRS80 matrix to begin with.
Purple cells indicate the pin numbers of connector P6.
Yellow cells indicate main differences with the TRS80 matrix.

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

PS/2 Scan code to CoCo Matrix conversion

PC
kbd
--> PS/2
interface
-scan-code-> FIFO -> CoCo Keyboard
Matrix Encoder
-- 8-bit row addr (PA7-0)
-- 8-bit col data (PB7-0)
CoCo
           
<--