A while ago someone complained about a laptop that had a problem
with duplicate letters showing up when you typed really fast.
I've come across such a laptop. It's a brand new Toshiba Satellite.
What I've found is that when you type fast enough (not all that
fast, really), you can read duplicate key releases from /dev/console.
That is, one key press and then two key releases. I've attached
a simple filter I added to xf86Events.c to make this laptop
usable. We were sending the duplicate releases to the clients
and confusing most of them.
Is there any case where we should send a release if the key
was not already down? If not, what do people think of the
attached patch which filters out releases if the key was not
already down?
This really seems like something the kernel should be
handling though. For the kernel people in the list, is this
something that people already know about? Obviously the
keyboard driver in 2.4.18 is sending nonsense data to
/dev/console on this laptop. It seems like some error checking
in the kernel is in order.
Mark.
*** xf86Events.c.old Sun May 19 23:05:02 2002
--- xf86Events.c Sun May 19 23:06:30 2002
***************
*** 262,267 ****
--- 262,269 ----
* ifdefs further (hv).
*/
+ static unsigned char _down_state[256];
+
#ifdef __linux__
extern u_char SpecialServerMap[];
#endif
***************
*** 935,941 ****
}
else
{
! ENQUEUE(&kevent, keycode, (down ? KeyPress : KeyRelease), XE_KEYBOARD);
}
}
#endif /* !__EMX__ */
--- 937,947 ----
}
else
{
! if(_down_state[keycode] || down) {
! ENQUEUE(&kevent, keycode, (down ? KeyPress : KeyRelease), XE_KEYBOARD);
! }
!
! _down_state[keycode] = down;
}
}
#endif /* !__EMX__ */