This patch makes the remote act more like the keyboard in respect to holding keys down. When the key is pressed and held, the first keypress event is emitted, then there is a pause (keypress events are returned as DIKS_NULL) and then subsequent events are released. I have just ballparked that events 2-9 could be ignored to create that "gap" between the first event and the stream that follows indicating a key being held down. This number could be tuned with experience.
Thots? -- Brian J. Murrell
Index: inputdrivers/lirc/lirc.c
===================================================================
RCS file: /cvs/directfb/DirectFB/inputdrivers/lirc/lirc.c,v
retrieving revision 1.15
diff -u -r1.15 lirc.c
--- inputdrivers/lirc/lirc.c 25 Sep 2002 11:18:43 -0000 1.15
+++ inputdrivers/lirc/lirc.c 12 Nov 2002 20:56:02 -0000
@@ -77,6 +77,7 @@
{
struct DFBKeySymbolName *symbol_name;
char *s, *name;
+ unsigned int n;
if (!keynames_sorted) {
qsort ( keynames,
@@ -90,7 +91,12 @@
if (!s || !s[1])
return DIKS_NULL;
- s = strchr( ++s, ' ' );
+ /* ingore repeated instances 2-9 to simulate keyboard repeating */
+ n = atoi(++s);
+ if (n > 1 && n < 10)
+ return DIKS_NULL;
+
+ s = strchr( s, ' ' );
if (!s|| !s[1])
return DIKS_NULL;
msg01058/pgp00000.pgp
Description: PGP signature
