Commodore 64 keyboard matrix layout

 Bit#0
$01,$FE
Bit#1
$02,$FD
Bit#2
$04,$FB
Bit#3
$08,$F7
Bit#4
$10,$EF
Bit#5
$20,$DF
Bit#6
$40,$BF
Bit#7
$80,$7F
Bit#0
$01,$FE
Insert/DeleteReturncursor left/rightF7F1F3F5cursor up/down
Bit#1
$02,$FD
3WA4ZSEleft Shift
Bit#2
$04,$FB
5RD6CFTX
Bit#3
$08,$F7
7YG8BHUV
Bit#4
$10,$EF
9IJ0MKON
Bit#5
$20,$DF
+ (plus)PL– (minus). (period): (colon)@ (at), (comma)
Bit#6
$40,$BF
£ (pound)* (asterisk); (semicolon)Clear/Homeright Shift (Shift Lock)= (equal)↑ (up arrow)/ (slash)
Bit#7
$80,$7F
1← (left arrow)Control2SpaceCommodoreQRun/Stop

Notes:

  1. Rows refer to values for memory address $DC00, columns to values for $DC01.