[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Multiple Keypress/release problems.
- To: email@example.com
- Subject: Re: Multiple Keypress/release problems.
- From: Jiri Svoboda <firstname.lastname@example.org>
- Date: Tue, 08 Jan 2002 23:20:12 +0100 (CET)
- Delivered-To: email@example.com
- Delivered-To: mailing list firstname.lastname@example.org
- Delivery-Date: Tue, 08 Jan 2002 17:21:33 -0500
- In-Reply-To: <3C2F7B80.6158DBE7@airmail.net>
- Mailing-List: contact email@example.com; run by ezmlm
- Reply-To: firstname.lastname@example.org
I didn't read the entire thread, but this is what I know about
To decrease the number of lines on the keyboard membrane there is
not a separate line for every key. Instead there is a matrix.
On ZX-Spectrum this is a strictly regular 4x10 (or 8x5, depending
on the point of view) matrix.
Up to two keys pressed simultaneously can be detected correctly
always. If you press 3 keys placed in the following way:
column 1 2 3 4
1 | Q | W | | |
2 | A | ? | | |
there is simply no way to determine the state of the S key,
since when you connect voltage to column 1 or 2 you
always get it on both lines 1 and 2.
This is called the matrix effect. (sounds cool, huh?)
The PC keyboard is slightly different. The matrix is not regular.
Ctrl,Shift and Alt keys have their own lines (so the keyboard
can detect Ctrl+Alt+Del:)
If you press a combination of keys which can't be correctly
determined, it will be ignored.
CAREFUL!! Different **PC** keyboads have DIFFERENT matrices!!
[Watch out, Chris!]
The possible combinations are therefore different.
If you are making a game make sure there is a key setup.
As you can see this isn't a matter of OP-sys, the BUS (USB,standard
serial keyboard), but of the keyboard membrane.
If you have any questions, you can reach me at
(i don't read the mailing list regualrly)
And don't forget about ZX-Spectrum, the coolest microcomputer ever!
> Chris wrote:
> > It is a hardware limitation, or rather a limitation built into the keyboard
> > encoder ICs inside the keyboard itself and possibly the keyboard decoder
> > circuitry on the motherboard.
> Ack! I thought that would be the answer - but had *hoped* that maybe there
> would be a way out.
> > I've no idea if USB keyboards are subject to
> > the same restrictions.
> Presumably - this is an attribute of the key decoding mechanism rather
> than of the way the data is sent to the motherboard.
> > http://www.ifbbc.com/html/did_you_know.html
> > may be of some interest. Most PC keyboards these days are membrane based so
> > they will use the multikey option.
> Well, it confirms the problem - but doesn't really explain what gets locked
> out when what gets pressed.
> So I'm left with...
> > > * Does anyone know the rules that determine which keys will work with which
> > > key combinations? Maybe I can work around it by picking just the right
> > > set of keys.
> > I believe it depends on the make of keyboard. For example I have two
> > connected to my Linux box now - a no-name "multimedia" keyboard via PS/2 and
> > my trusty Sun Type 5 connected to COM1. On the no-name the problem is exactly
> > as you describe, but the type5 can handle wa and s but not 4 keys....
> Hmmm - that's pretty depressing - but it does suggest that perhaps all *PC*
> keyboards work the same way. I could live with not supporting Sun keyboards
> plugged into serial ports!
> So I guess I need to find out how the row/column decoding is wired up to the
> keys and *hope* that all PC keyboards do in fact work the same way.
Poctenicko pro kazdy den: http://www.novinky.cz