From 58aa16568acc18b1c6f247f07f7a732713e66cc9 Mon Sep 17 00:00:00 2001 From: chatty Date: Wed, 10 Mar 1999 18:20:33 +0000 Subject: Adapted for auto-repeat keys and manipulation slips. --- src/irdumptable | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) (limited to 'src/irdumptable') diff --git a/src/irdumptable b/src/irdumptable index 94554e0..e60a656 100755 --- a/src/irdumptable +++ b/src/irdumptable @@ -66,8 +66,8 @@ if (!defined ($typekeys{$type})) { # first, prepare to receive key presses from Ivy bus my $host = 'nebul'; -Ivy::bindRegexp ("$host\.IRBOX unknown code ([0-9]+ [0-9]+ [0-9]+ [0-9]+ [0-9]+ [0-9]+)", [\&ReceiveCode]); -Ivy::bindRegexp ("$host\.IRBOX Down (.*)", [\&PrintCode]); +Ivy::bindRegexp ("[a-z]*\.IRBOX unknown code ([0-9]+ [0-9]+ [0-9]+ [0-9]+ [0-9]+ [0-9]+)", [\&ReceiveCode]); +Ivy::bindRegexp ("[a-z]*\.IRBOX Down (.*)", [\&PrintCode]); Ivy::start (-loopMode => 'LOCAL', @@ -92,10 +92,17 @@ Ivy::mainLoop (); exit 1; - +my $lastcode = "000"; sub ReceiveCode { my $code = $_[1]; + + if (defined $lastcode and $code eq $lastcode) { + print "(mmm... previous key had autorepeat!) ..."; + return; + } + $lastcode = $code; + print "ok, code = $code\n"; $table{$key} = $code; $key = shift @keylist; -- cgit v1.1