Re: keyboard problem, again

Pavel Machek (pavel@suse.cz)
Thu, 2 Dec 1999 12:06:56 +0100


Hi!

> Again, sorry to bother you about this, but the problem with Toshiba's
> keyboard is real, and not only on my notebook, I confirmed this with
> other people on the net. Please, is anybody in charge with the
> keyboard code? Of course that code is supposedly working ok and

That is bug. It is hardware problem common accross toshiba notebooks.

Linus: it would be nice to have this workaround to common toshiba
bug.

Pavel

--- clean/drivers/char/keyboard.c Mon Nov 15 22:12:40 1999
+++ linux/drivers/char/keyboard.c Thu Dec 2 11:17:27 1999
@@ -204,6 +210,33 @@
char up_flag = down ? 0 : 0200;
char raw_mode;

+ /*
+ * Begin patch for Toshiba Satellite 2595XDVD. Under some
+ * circumstances, its keyboards behaves like ignoring the
+ * kbd repeat delay. This happens in conjunction with shift
+ * keys (ctrl, alt, shift) and leads to undesirable repeat
+ * of a key even if pressed briefly. Fix it by ignoring any
+ * subsequent occurence of the second identical scancode for
+ * 200 ms. IMO, this doesn't break anything on a good keyboard.
+ */
+ static int prev_scancode = 0;
+ static int stop_jiffies = 0;
+
+ /* new scancode, trigger delay */
+ if (scancode != prev_scancode)
+ stop_jiffies = jiffies;
+
+ /* same scancode, accept only after the delay */
+ else if (jiffies - stop_jiffies >= 10)
+ stop_jiffies = 0;
+
+ /* glitch! bail out... */
+ else
+ return;
+
+ prev_scancode = scancode;
+ /* End Toshiba patch. */
+
acpi_access(acpi_kbd);

do_poke_blanked_console = 1;

-- 
I'm really pavel@ucw.cz. Look at http://195.113.31.123/~pavel.  Pavel
Hi! I'm a .signature virus! Copy me into your ~/.signature, please!

- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.rutgers.edu Please read the FAQ at http://www.tux.org/lkml/