So now I have a matrix keyboard (just 2 rows x 2 columns for testing), with full masking and ghosting protection. There is still a little noise I need to filter out. Here it is being tested with Strike Fighters 2.
This is the prototype. The bottom board holds the CD4021BE (rows) and 74HC595 (columns). The top board has the four switches plus diodes that make up the ‘keys’. The third chip you see is another CD4021BE, which is used to store the device ID.