lkml.org 
[lkml]   [2003]   [Feb]   [23]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: Toshiba keyboard workaroun
Hi!

> > You said that you'll submit toshiba keyboard fix for 2.4 to
> > marcelo... Here goes 2.5 version, will you submit it to Linus? ;-).
>
> This belongs into drivers/input/keyboard/atkbd.c, not here!
>
> Subsequent keypresses are already ignored - autorepeat is done in
> software, however if you get a very quick press-release-press of the

No, it did not do releases.

Guess I should really try 2.5. without that patch, because vojtech's
patches might have had fixed that as a side effect. Alan, please don't
push this patch to Linus until this is fixed. [2.4 version is still
neccessary, through].
Pavel

> same key that means the keyboard controller didn't do proper debouncing
> and you probably can ignore the later release and press. But you must
> ignore the release as well. Further - comparing to 10 jiffies isn't a
> good idea - jiffies speed is different on different archs.



> > --- clean/drivers/char/keyboard.c 2003-02-15 18:51:18.000000000 +0100
> > +++ linux/drivers/char/keyboard.c 2003-02-15 19:19:45.000000000 +0100
> > @@ -1020,6 +1041,23 @@
> > struct tty_struct *tty;
> > int shift_final;
> >
> > + /*
> > + * Fix for Toshiba Satellites. Toshiba's like to repeat
> > + * "key down" event for A in combinations like shift-A.
> > + * Thanx to Andrei Pitis <pink@roedu.net>.
> > + */
> > + static int prev_scancode = 0;
> > + static int stop_jiffies = 0;
> > +
> > + /* new scancode, trigger delay */
> > + if (keycode != prev_scancode) stop_jiffies = jiffies;
> > + else if (jiffies - stop_jiffies >= 10) stop_jiffies = 0;
> > + else {
> > + printk( "Keyboard glitch detected, ignoring keypress\n" );
> > + return;
> > + }
> > + prev_scancode = keycode;
> > +
> > if (down != 2)
> > add_keyboard_randomness((keycode << 1) ^ down);
>

--
Horseback riding is like software...
...vgf orggre jura vgf serr.
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 13:33    [W:1.244 / U:0.184 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site