Reply #1 (would you believe my HS English teacher liked how concisely I could word things???)
Hi Saint,
My page -
http://www.mameworld.net/emuadvice/keyhack2.html covers this in detail under "Little Known Facts and Common Misconceptions" See also
http://www.dribin.org/dave/keyboard/ for more of the "physics" of the problem.
Bottom line, imho, is diodes will work just fine on an older keyboard that shows true ghosting, but not one that shows blocking. Also, as RandyT said, some keys have an independent pressed key maximum.
Quick test - Run ghostkey or keyhook or one of the other utilities. (or even Notepad, in a pinch) Press a bunch of keys -
If you see keys displayed which you did not press - diodes may help, and you need to see how many keys you can press at the same time (but you will see more keys than this actually registering).
If after three or four or five keys are pressed (probably different numbers based on different combinations) additional keys stop registering, your keyboard probably uses blocking, diodes won't help. It may still be hackable as shown on my page, but you need to map out the matrix and THEN test for a pressed key maximum.
BTW, FWIW, I've mapped out the matrix for three different keyboards and tested a bunch more. I haven't found any that showed true ghosting and not blocking, nor any with a pressed key maximum. They're out there, I have no doubts, but I haven't run across them.
Don't forget the other problem-
There are three (four if you count the pressed key maximum) problems - Ghosting, masking, and blocking - Short explanations -
Ghosting occurs with matrix encoders without diodes when a "Ghost" key is generated b/c the encoder cannot accurately read the matrix. It can be compensated for with diodes, and usually isn't a problem - if the encoder generates a "Q" but MAME isn't using it, who cares!
Masking occurs when a ghost key is generated and one of the keys is released, but the encoder doesn't recognize the key release. It results in a stuck key and can be corrected by using diodes to prevent the ghosting from happening.
Blocking is a software/firmware issue which prevents the keystokes from registering and producing ghostkeys. It will render diodes ineffective.
-key blocking. I'm assuming that here the opposite is happening -- so many keys are pressed with common matrixes at once, that the encoder doesn't even know that certain keys are being pressed.
Not exactly. The encoder would normally not care. Let's say you don't have blocking. You could press 40 keys and the encoder would generate all of them. It knows they are being depressed. It just would also generate 15 or 20 ghost keys that were intended.
What happened is about 1989, keyboard manufacturers were aware of the problem, and decided that most typists wouldn't press 15 keys at the same time, and it was better if the keyboard didn't register 3 simultaneous keypresses that could generate a ghost key so they "blocked" the third key (and any subsequent keys) from registering.
The "pressed key maximum" as RandyT said, was an attempt to limit the number of simultaneous keypresses allowed, again probably as a cost savings to allow less RAM requirements.