linux-input.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Peter Stokes <linux@dadeos.co.uk>
To: linux-input@vger.kernel.org
Subject: Soft-autorepeat functionality
Date: Tue, 12 Feb 2008 22:01:34 +0000	[thread overview]
Message-ID: <200802122201.34643.linux@dadeos.co.uk> (raw)

[-- Attachment #1: Type: text/plain, Size: 833 bytes --]

I've been experimenting with using the software autorepeat functionality in 
drivers/input/input.c and have the problem that it autorepeats all EV_KEY 
reported events, this includes mouse buttons etc. which for a combined 
mouse/keyboard device is undesirable. I appreciate that I could override the 
functionality by providing my own implementation of software autorepeat, 
which filters such buttons from being repeated, but I was wondering whether 
this is something that should be included in the default implementation?

I'm not sure where the definition of KEY_MIN_INTERESTING comes from but it 
appears to me that it is only keys with codes less than this value that 
should be repeated?

So, please find attached a patch that implements the functionality I am 
looking for...

Best regards

Peter Stokes


[-- Attachment #2: input_autorepeat.patch --]
[-- Type: text/x-diff, Size: 476 bytes --]

Signed-off-by: Peter Stokes <linux@dadeos.co.uk>

--- linux-2.6.24-orig/drivers/input/input.c	2008-01-24 22:58:37.000000000 +0000
+++ linux-2.6.24/drivers/input/input.c	2008-02-11 20:02:03.000000000 +0000
@@ -123,6 +123,7 @@
 static void input_start_autorepeat(struct input_dev *dev, int code)
 {
 	if (test_bit(EV_REP, dev->evbit) &&
+	    code < KEY_MIN_INTERESTING &&
 	    dev->rep[REP_PERIOD] && dev->rep[REP_DELAY] &&
 	    dev->timer.data) {
 		dev->repeat_key = code;

                 reply	other threads:[~2008-02-12 23:14 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=200802122201.34643.linux@dadeos.co.uk \
    --to=linux@dadeos.co.uk \
    --cc=linux-input@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).