if (@ARGV != 2) {
die "Usage: gen-keyname-table.pl keynames.txt keynames-translate.txt > keynamesprivate.h\n";
}
open IN, $ARGV[0] || die "Cannot open $ARGV[0]: $!\n";
@keys = ();
@translate = (); while (defined($_ = <IN>)) {
next if /^!/; if (!/^\s*(0x[0-9a-f]+)\s+([\w_]*\S)\s+(1)?\s*$/) {
die "Cannot parse line $_";
}
push @keys, [$1, $2];
if (defined ($3)) {
push @translate, $2;
}
}
close IN;
open IN, $ARGV[1] || die "Cannot open $ARGV[1]: $!\n"; while (defined($_ = <IN>)) {
next if /^!/; if (!/^\s*([\w_]*\S)\s+$/) {
die "Cannot parse line $_";
}
push @translate, $1;
}
close IN;
$offset = 0;
$date = gmtime;
print <<EOT;
/* keynamesprivate.h: Generated by gen-keyname-table.pl from keynames.txt
*
* Date: $date
*
* Do not edit.
*/
static const char keynames[] =
EOT
/*
* Translators, the strings in the 'keyboard label' context are
* display names for keyboard keys. Some of them have prefixes like
* XF86 or ISO_ - these should be removed in the translation. Similarly,
* underscores should be replaced by spaces. The prefix 'KP_' stands
* for'key pad' and you may want to include that in your translation.
* Here are some examples of English translations:
* XF86AudioMute - Audio mute
* Scroll_lock - Scroll lock
* KP_Space - Space (keypad)
*/
EOT
for $key (@translate) { if ($key eq 'KP_Space') {
print "/* Translators: KP_ means 'key pad' here */\n";
} if ($key eq 'XF86MonBrightnessUp') {
print "/* Translators: 'Mon' means Monitor here, and the XF86 prefix should be removed */\n";
}
print <<EOT;
NC_("keyboard label", "$key")
EOT
}
print <<EOT;
#endif
EOT
Messung V0.5 in Prozent
¤ Dauer der Verarbeitung: 0.10 Sekunden
(vorverarbeitet am 2026-07-03)
¤
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.