diff options
Diffstat (limited to 'src/irdumptable')
-rwxr-xr-x | src/irdumptable | 13 |
1 files changed, 10 insertions, 3 deletions
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; |