Commit 977d8824 authored by Birte Kristina Friesel's avatar Birte Kristina Friesel
Browse files

Add lskeys helper script

parent 90899f8b
Loading
Loading
Loading
Loading

scripts/lskeys.pl

0 → 100755
+20 −0
Original line number Diff line number Diff line
#!/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);