diff options
| author | Tom Feist <shabble@metavore.org> | 2011-01-01 17:40:32 +0000 | 
|---|---|---|
| committer | Tom Feist <shabble@metavore.org> | 2011-01-01 17:40:32 +0000 | 
| commit | c2b574fb2a1123ecd086bf5df76d8083c6bf6157 (patch) | |
| tree | efa1ed021097401c64a1e8ca6f0819fa21d4058d /feature-tests | |
| parent | module_test: The tiny beginnings of an irssi loadable-module (not script) for (diff) | |
| download | irssi-scripts-c2b574fb2a1123ecd086bf5df76d8083c6bf6157.tar.gz irssi-scripts-c2b574fb2a1123ecd086bf5df76d8083c6bf6157.zip | |
key_test: dumped some key-processing code in there I plan to look at later.
Diffstat (limited to 'feature-tests')
| -rw-r--r-- | feature-tests/key_test.pl | 19 | 
1 files changed, 19 insertions, 0 deletions
| diff --git a/feature-tests/key_test.pl b/feature-tests/key_test.pl index b16ff00..e4be63a 100644 --- a/feature-tests/key_test.pl +++ b/feature-tests/key_test.pl @@ -98,3 +98,22 @@ sub decode_keypress {          return 'unknown ' . $code;      }  } + + +# # TODO: needs some fixing up? +# sub _key { +#     my ($key_str, $flags) = @_; +#     my $key_num; + +#     if ($key_str eq 'DEL' or $key_str eq 'BS') { +#         $key_num = 127; +#     } else { +#         die "Key must be single char" unless length($key_str) == 1; +#         $key_num = ord($key_str); +#         if ($flags & CTRL_KEY) { +#             $key_num = 0 if ($key_num == 32); +             +#         } +#     } +#     return $key_num; +# } | 
