Re: Keyboard error

Martin Mares (mj@mj.gts.cz)
Mon, 11 Aug 1997 09:57:30 +0200


Hi,

> The keyboard signals the error, and there is nothing the driver can do
> about it. So yes, the answer is "don't do that, then".

There is a compile-time switch in the driver (in drivers/char/pc_keyb.h
to be precise) called KBD_REPORT_ERR which controls whether these errors
reported by the keyboard controller are reported or not.

> Many multi-key-presses will create a "shadow key press" (so when you
> press three keys, the keyboard controller will actually think that
> you're pressing four keys, and I suspect that the keyboard controller
> just notices that two keys changed simulataneously and will consider
> this an error.

I think that most keyboard report an error whenever they are uncertain
about what is really pressed and what is only a shadow key (also called
a "ghost key").

> The keyboard array is usually set up in such a way that the "normal"
> keys that are often pressed together (alt, shift, cursor keys etc)
> create as few of these shadows as possible, but you've obviously found
> one of them. I suspect that you'll easily find more by just pressing
> lots of keys at the same time..

Good keyboards have shift keys completely off-matrix, so they can be
combined arbitrarily with any other keys.

> You can probably fix this a few different ways:
> - get a new, expensive keyboard. I can't guarantee it, but I suspect
> the better keyboards will have much fewer of the shadow keys (maybe
> they'll even have separate lines for each key instead of using an
> array, who knows?)

Unfortunately, not all expensive keyboards are good wrt key ghosting :-(

> - uncomment the kernel message. You probably don't really care, anyway.
> - "don't do that, then". It's only likely to be a problem if you have
> a game that requires the keys in question and you really want to
> press them together.

Unfortunately, it isn't -- some bad keyboards have very nasty problems even
with usual situations as when quickly typing C-x C-s in Emacs (holding both x
and s for a small time) -- they report an error even in such cases. The only
solution if you have such bad keyboard is to throw it out and buy a better one.

> (*) NOTE! It's been a _long_ time since I did any keyboard work, and I
> can not guarantee that this is actually how the keyboard you have is
> done. I suspect it is, but maybe PC keyboards of today are different
> from what I remember. Who knows? On a PC, all the keyboard scanning
> details are hidden by the keyboard controller, so what I remember from
> doing the scanning by hand isn't necessarily true any more.

Still right even for new keyboards (AFAIK) -- I was experimenting with this
a lot when I was writing some keyboard drivers (including the current pc_keyb.c
in 2.1)...

Have a nice fortnight

-- 
Martin `MJ' Mares   <mj@gts.cz>   http://atrey.karlin.mff.cuni.cz/~mj/
Faculty of Math and Physics, Charles University, Prague, Czech Rep., Earth
"What's the difference between '486 and Pentium? About 2.10^-4"