diff options
author | Daniel Friesel <derf@finalrewind.org> | 2011-01-15 00:42:09 +0100 |
---|---|---|
committer | Daniel Friesel <derf@finalrewind.org> | 2011-01-15 00:42:09 +0100 |
commit | 977d8824da394f9830f2aa1093b359bc5cf48537 (patch) | |
tree | 9e55f3ff31acfca43a2261980259d4abc75d82ed /scripts | |
parent | 90899f8b9fd99efe958601421ef296b3e383fbbe (diff) |
Add lskeys helper script
Diffstat (limited to 'scripts')
-rwxr-xr-x | scripts/lskeys.pl | 20 |
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); |