summaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
Diffstat (limited to 'scripts')
-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);