The BBC Micro Keyboard

The BBC micro reads the keyboard data from the memory map, as 10 rows of 8 columns.

Row   Data (read)
    7 6 5 4 3 2 1 0
0   esc tab shft
lock
caps
lock
!
1
f0 Q shft
x2
1   f1 Z S A "
2
W #
3
ctrl
2   f2 sp C X 0 E $
4
 
3   f3 V G F R T %
5
 
4   f5 B M Y &
6
'
7
f4  
5   f6 M N J U I 8  
6   f8 <
,
L K O )
9
f7  
7   f9 > + @ P 0 =  
. ; p o -
8   | ? } * } _ ~  
\ / ] : ] £ ^
9   ->       up dn <-  

Yellow cells are used for start-up options
Red text indicates inconsistency with PC keyboard.
The reset key goes to the signal not_reset.
The two shift keys share the same crosspoint.
Bits 0-7 are read one bit at a time into PA7.
The bit select is controlled by the outputs PA6..4.
The row select is controlled by the outputs PA3...0.
It thus read as one of 128 bits addressed by PA6...0

PS/2 Scan code to BBC Micro Matrix conversion

PC
kbd
--> PS/2
interface
-scan-code-> FIFO -> BBC Keyboard
Matrix Encoder
<-- 4-bit row addr
--> 8-bit row data
BBC
micro
6522
chip
           
<-- <-control-codes-   <-- encoder <-- status for LEDs