I have blogged about the Navigation Computer Display's Keyboard here. I was moving a 6821 PIA to its resting place and checked my Databooks where I found a pdf copy of the 6800 application manual. where they had a 4x4 keyboard interface. It was based around a row and column decoder but one cool thing added to it, and no diodes.

And this has one more trick provided by the quad input NAND-Gate. Now an MCP23017 will work very nicely. It has interrupt outputs. But if you don't want to use this part this will still work on your Arduino.

Here is the keyboard mapping:

int keyMap [][] = {1, 2, 3}, {4, 5, 6}, {7, 8, 9}

{A, 0, B}, {C, F , D};

int alphaMap[][] = {A, B, C}, {D, E, F}, { G, H, I}, {J, K, L}, {N, N, 0}, {P, Q, R}, {S, T, U}, {V, W, X}, {Y, Z}

A0123
A1456
A2789
A3CLR0ENT
A4KYBDn/aTGT-STR
B0B1B2

The scanner is now just two loops one inside each other:

int scaner(){
int row;
int col;

    for ( row = 0; row < 6; row ++) {
          digitalWrite( row, HIGH ); 
        for ( col = 0; col < 4; col++) {
              if ((state = digitalRead(col)) == HIGH) {
                    break; }
              else {
                return( keyMap[row][col];)
          }}}}             

There is a problem with the alphaMap as it does not reflect what happens with an alpha keystroke, as it is not just one keystroke but a combination of two keystrokes. The following is from TM 11-5841-281-12, OPERATOR'S AND ORGANIZATIONAL MAINTENANCE MANUAL DOPPLER NAVIGATION SET section 3.5:

Data Entry. To enter a number, press the corresponding key. To enter a letter, first press the key corresponding to the desired letter; then press a key in the left, mid, or right column corresponding to the position of the letter on the pushbutton. For example; to enter an L, first press L, then either 36, or 9 in the right column.

To accomplish this task a state table must be built, which has direct consequences on the MCD's displays.

 

BTW the scanner on the left is not the scanner for the keyboard, the scanner is a state table but everything is rolled up into it. Alpha Keys, Numeric Keys, and the four special keys CLR, ENT, KYBD, TGT-STR. As well as the position of both rotatory switches Mode and Display.

~~Cris