summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Friesel <derf@finalrewind.org>2011-01-15 00:42:09 +0100
committerDaniel Friesel <derf@finalrewind.org>2011-01-15 00:42:09 +0100
commit977d8824da394f9830f2aa1093b359bc5cf48537 (patch)
tree9e55f3ff31acfca43a2261980259d4abc75d82ed
parent90899f8b9fd99efe958601421ef296b3e383fbbe (diff)
Add lskeys helper script
-rwxr-xr-xscripts/lskeys.pl20
1 files changed, 20 insertions, 0 deletions
diff --git a/scripts/lskeys.pl b/scripts/lskeys.pl
new file mode 100755
index 0000000..530e38d
--- /dev/null
+++ b/scripts/lskeys.pl
@@ -0,0 +1,20 @@
+#!/usr/bin/env perl
+use strict;
+use warnings;
+use 5.010;
+
+use autodie;
+
+my @keys;
+
+open(my $fh, '<', 'src/keyevents.c');
+while (my $line = <$fh>) {
+ chomp($line);
+ if ($line =~ qr{
+ if \s \( \! strcmp \( action , \s " (?<key> [^"]+ ) " \)\) }x) {
+ push(@keys, $+{key});
+ }
+}
+close($fh);
+
+say join("\n", sort @keys);