Commodore 64 Keyboard Matrix  

Output Port  $dc00
Input Port   $dc01

         
         ROW

         $fe  down    f5      f3      f1      f7     right  return delete  
         $fd  l.shift e       s       z       4      a      w      3  
         $fb  x       t       f       c       6      d      r      5
         $f7  v       u       h       b       8      g      y      7
         $ef  n       o       k       m       o      j      i      9
         $df  ,       @       :       .       -      l      p      +
         $bf  /       ^       =       r.shift home   ;      *      pound   
         $7f  stop    q       C=      space   2      cntrl  escape 1    

COLUMN        $7f     $bf     $df     $ef     $f7    $fb    $fd    $fe   

Using this table.

Load the value in ROW that corresponds to the key you want to scan for,
store the value in OUTPUT PORT ($dc00).

Load INPUT PORT ($dc01) and compare this value to the value in COLUMN that
corresponds to the key you want to scan for.


