From 071cc70f0586e7296ed22baafb67149f76e6620a Mon Sep 17 00:00:00 2001 From: David Härdeman Date: Tue, 14 Jul 2015 14:50:25 +0200 Subject: Change remote to use GtkButtons --- tools/generate-input-keycodes.sh | 71 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 71 insertions(+) create mode 100755 tools/generate-input-keycodes.sh (limited to 'tools') diff --git a/tools/generate-input-keycodes.sh b/tools/generate-input-keycodes.sh new file mode 100755 index 0000000..96f28ff --- /dev/null +++ b/tools/generate-input-keycodes.sh @@ -0,0 +1,71 @@ +#!/bin/bash + +INPUT_HEADER="/usr/include/linux/input.h" +OUTPUT_ENUM="linux-input-enum.h" +OUTPUT_MAP="linux-input-keycodes.h" +SKIP="KEY_MIN_INTERESTING KEY_MAX KEY_CNT" + +if [ ! -e "$INPUT_HEADER" ]; then + echo "Can't find input header: $INPUT_HEADER" >&2 + exit 1 +fi + +cat > "$OUTPUT_ENUM" < "$OUTPUT_MAP" <> "$OUTPUT_ENUM" + echo " { \"$NAME\", $NAME, $ALIAS, NULL }," >> "$OUTPUT_MAP" +done + +cat >> "$OUTPUT_ENUM" << EOF +}; +#endif +EOF + +cat >> "$OUTPUT_MAP" << EOF + { NULL, 0, false, NULL } +}; +#endif +EOF + + +exit 0 + + -- cgit v1.2.3