Electron internal key matrix, accessed via sideways ROM 8 A0 A1 A2 A3 A4 A5 A6 A7 A8 A9 A10 A11 A12 A13 +---+---+---+---+---+---+---+---+---+---+---+---+---+---+ D0 |ESC| 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | - |<- |-> | +---+---+---+---+---+---+---+---+---+---+---+---+---+---+ D1 |CAP| Q | W | E | R | T | Y | U | I | O | P | UP|DWN|CPY| +---+---+---+---+---+---+---+---+---+---+---+---+---+---+ D2 |CTL| A | S | D | F | G | H | J | K | L | ; | : |RET| | +---+---+---+---+---+---+---+---+---+---+---+---+---+---+ D3 |SFT| Z | X | C | V | B | N | M | , | . | / | |DEL|SPC| +---+---+---+---+---+---+---+---+---+---+---+---+---+---+ A0-A13 fed to keyboard D0-D3 read from keyboard &A000 1010 0000 all columns &BF00,X 1011 1111 0111 11111 &BF00,X 1011 1111 1011 11111 &9FFF 1001 1111 &BF00,X 1011 1111 1101 11111 &AFFF 1010 1111 &BF00,X 1011 1111 1110 11111 &B7FF 1011 0111 &BF00,X 1011 1111 1111 01111 &BBFF 1011 1011 &BF00,X 1011 1111 1111 10111 &BDFF 1011 1101 &BF00,X 1011 1111 1111 11011 &BEFF 1011 1110 &BF00,X 1011 1111 1111 11101 &BF00,X 1011 1111 1111 11110 Electron internal key number +---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+ |x0 |x1 |x2 |x3 |x4 |x5 |x6 |x7 |x8 |x9 |xA |xB |xC |xD |xE |xF | +===+===+===+===+===+===+===+===+===+===+===+===+===+===+===+===+ | | | | || \|[ ]| | |^ ~|_ {| | | |£ }| * | | 0x | | | | | ->|CPY|&00|SPC|<- |dwn|RET|DEL| - | up| : |&00| +---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+ | @ | | + | ? | ) | | | > | ( | | | < | ' | | | | 1x | 0 | P | ; | / | 9 | O | L | . | 8 | I | K | , | 7 | U | J | M | +---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+ | & | | | | % | | | | $ | | | | # | | | | 2x | 6 | Y | H | N | 5 | T | G | B | 4 | R | F | V | 3 | E | D | C | +---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+ | " | | | | ! | | | | |FNC| | | | | | | 3x | 2 | W | S | X | 1 | Q | A | Z |ESC|CAP|CTL|SFT| | | | | +---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+ Internal key number converted to keyboard column/row address with: (keynum DIV 4)-1 = column address line (keynum MOD 4) = row bit position Table overrun in MOS results in: &3C: &FE58,&01 -> &BF58,&01 %1011111101011000 -126 -> &3D: &FE58,&02 -> &BF58,&02 %1011111101011000 Y U I O P DWN UP CPY -124 -> &3E: &FE58,&04 -> &BF58,&04 %1011111101011000 H J K L ; : RET &3F: &FE58,&08 -> &BF58,&08 %1011111101011000 If MOS keyboard table modified, unused keys &06 and &0F could be used, for example for TAB key.