lkml.org 
[lkml]   [2006]   [Feb]   [21]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: Suppressing softrepeat
On Tue, Feb 21, 2006 at 04:32:21PM -0500, Dmitry Torokhov wrote:
> On 2/21/06, Vojtech Pavlik <vojtech@suse.cz> wrote:
> > On Tue, Feb 21, 2006 at 12:43:08PM -0800, Pete Zaitcev wrote:
> >
> > > Add the "nosoftrepeat" parameter. This is useful if a "dumb" keyboard
> > > has (unswitcheable) hardware repeat, like in Dell DRAC3.
> >
> > The softrepeat code should properly ignore all autorepeated keys from a
> > 'dumb' keyboard. It's rather common that a keyboard we can't communicate
> > with is in autorepeat mode, because that's the mode AT keyboards wake up
> > in after power on.
>
> Hmm, atkbd only detects "repeated" keystrokes if it is working in
> hard-repeat mode:
>
> value = atkbd->release ? 0 :
> (1 + (!atkbd->softrepeat &&
> test_bit(atkbd->keycode[code], atkbd->dev->key)));

The above code is correct - in softrepeat mode, a value of '1' is
reported for each keystroke, even repeated ones, and that is then
filtered out by the input.c duplicate event filtering logic.

For hardrepeat mode, the value is changed to '2', and thus passes
through the sieve in input.c.

> Should we always recognize "repeats"? Then we woudl not need any
> workarounds, be it kbdrate or sysfs.

I'm not sure where this would help. The problem is that the DRAC3
'holds' the key pressed for full 500 ms before sending the release
scancde, even if the user pressed it just momentarily. It doesn't
generate repeat scancodes in this time. This however triggers the
softrepeat, which is by default set to 250 ms, causing repeated
characters all the time.

--
Vojtech Pavlik
Director SuSE Labs
-
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: 2006-02-21 22:43    [from the cache]
©2003-2011 Jasper Spaans