Re: Input issues - key down with no key up

From: Vojtech Pavlik
Date: Fri Aug 15 2003 - 08:15:51 EST


On Fri, Aug 15, 2003 at 02:04:50PM +0100, Jamie Lokier wrote:
> Andries Brouwer wrote:
> > Yes, it would still be considered down. But that does not imply
> > that pressing it doesnt do anything. It is up to the driver
> > to discard key presses, and I think it shouldnt.
> > (Unless of course the user asks for that behaviour - it may be required
> > on some broken laptops.)
>
> It should discard multiple presses of the same key in very rapid
> succession, when that is immediately after the first press of that
> key. (After a time has passed, rapid successive presses are due to
> auto-repeat, which is ok).
>
> Several laptops seem to send a key down event 3, 5 or very many times
> in response to a single press.

One way this could be handled fairly nicely (although the method is
maybe too clever to be good) would be to leave the autorepeat up to the
sw, ignore any successive presses without a release and watch whether
the keyboard will start autorepeating the key after 250 msec. If it does
not, then force the key to be released even if we got no release
scancode.

--
Vojtech Pavlik
SuSE Labs, SuSE CR
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/