Package: inputlirc
Version: 16-1
Hello,
inputlirc increases the repeat flag even when two _different_ keys are
pressed within the repeat time.
Here is an example output of "irw" where I pressed two different keys
within the defined repeat-rate (300 ms in my case):
# irw
47 0 KEY_KP7 event0
48 1 KEY_KP8 event0
I think this is not the intended behaviour. Since the second key has a
different key code, the repeat flag should be zero for that second key.
My system configuration:
# uname -a
Linux dockstar 2.6.32-5-kirkwood #1 Wed Oct 20 12:58:44 UTC 2010
armv5tel GNU/Linux
# cat /etc/default/inputlirc
# Options to be passed to inputlirc.
EVENTS="/dev/input/event*"
OPTIONS="-m 55 -r 300"
I attached a small patch to correct this:
Index: inputlircd.c
===================================================================
--- inputlircd.c (revision 15)
+++ inputlircd.c (working copy)
@@ -70,6 +70,7 @@
static long repeat_time = 0L;
static struct timeval previous_input;
+static struct input_event previous_event;
static int repeat = 0;
static void *xalloc(size_t size) {
@@ -252,7 +253,7 @@
struct timeval current;
gettimeofday(¤t, NULL);
- if(time_elapsed(&previous_input, ¤t) < repeat_time)
+ if(event.code == previous_event.code && time_elapsed(&previous_input,
¤t) < repeat_time)
repeat++;
else
repeat = 0;
@@ -263,6 +264,7 @@
len = snprintf(message, sizeof message, "%x %x KEY_CODE_%d %s\n",
event.code, repeat, event.code, evdev->name);
previous_input = current;
+ previous_event = event;
for(client = clients; client; client = client->next) {
if(write(client->fd, message, len) != len) {
Best regards,
Oliver
--
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org