diff options
author | chatty | 1999-03-10 18:20:33 +0000 |
---|---|---|
committer | chatty | 1999-03-10 18:20:33 +0000 |
commit | 58aa16568acc18b1c6f247f07f7a732713e66cc9 (patch) | |
tree | 4b520a69d07625ae2ffc83206144c6c62ad85b86 /src/irdumptable | |
parent | 96729d720618d6531f6c35a165c61a4d68665cd2 (diff) | |
download | irbox-58aa16568acc18b1c6f247f07f7a732713e66cc9.zip irbox-58aa16568acc18b1c6f247f07f7a732713e66cc9.tar.gz irbox-58aa16568acc18b1c6f247f07f7a732713e66cc9.tar.bz2 irbox-58aa16568acc18b1c6f247f07f7a732713e66cc9.tar.xz |
Adapted for auto-repeat keys and manipulation slips.
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; |