From c2b574fb2a1123ecd086bf5df76d8083c6bf6157 Mon Sep 17 00:00:00 2001 From: Tom Feist Date: Sat, 1 Jan 2011 17:40:32 +0000 Subject: key_test: dumped some key-processing code in there I plan to look at later. --- feature-tests/key_test.pl | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) (limited to 'feature-tests') 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; +# } -- cgit v1.2.3