summaryrefslogtreecommitdiff
path: root/tools/generate-input-keycodes.sh
diff options
context:
space:
mode:
authorDavid Härdeman <david@hardeman.nu>2015-07-22 23:39:29 +0200
committerDavid Härdeman <david@hardeman.nu>2015-07-22 23:39:29 +0200
commit10836ae78302aa778553300167f6cdebdf8d884b (patch)
treeebb7a3501b11682de18055b813ed5007cb7ffd5d /tools/generate-input-keycodes.sh
parentb51c1c648146e49c25c4d6a2a6f5b9b66ea3190d (diff)
Improve rcm-server integration with evdev generation
Diffstat (limited to 'tools/generate-input-keycodes.sh')
-rwxr-xr-xtools/generate-input-keycodes.sh34
1 files changed, 2 insertions, 32 deletions
diff --git a/tools/generate-input-keycodes.sh b/tools/generate-input-keycodes.sh
index 988940d..bdae3d1 100755
--- a/tools/generate-input-keycodes.sh
+++ b/tools/generate-input-keycodes.sh
@@ -5,7 +5,6 @@ set -e
INPUT_HEADER="/usr/include/linux/input.h"
LOCAL_INPUT_HEADER="linux-input.h"
OUTPUT_MAPH="linux-input-keycodes.h"
-OUTPUT_MAPC="linux-input-keycodes.c"
SKIP="KEY_MIN_INTERESTING KEY_MAX KEY_CNT"
if [ ! -e "$LOCAL_INPUT_HEADER" ]; then
@@ -18,35 +17,7 @@ if [ ! -e "$LOCAL_INPUT_HEADER" ]; then
fi
cat > "$OUTPUT_MAPH" <<EOF
-#ifndef foolinuxinputkeycodesfoo
-#define foolinuxinputkeycodesfoo
-
-/* AUTOGENERATED: DO NOT EDIT */
-
-#include <unistd.h>
-#include <stdint.h>
-#include <stdbool.h>
-#include "$LOCAL_INPUT_HEADER"
-
-struct linux_input_keycode {
- const char *name;
- uint32_t value;
- bool alias;
- void *cairo_surface;
-};
-
-extern struct linux_input_keycode linux_input_keycodes[];
-
-#endif
-EOF
-
-cat > "$OUTPUT_MAPC" << EOF
/* AUTOGENERATED: DO NOT EDIT */
-
-#include "$LOCAL_INPUT_HEADER"
-#include "$OUTPUT_MAPH"
-
-struct linux_input_keycode linux_input_keycodes[] = {
EOF
cat "$LOCAL_INPUT_HEADER" | grep "^#define[[:space:]]*KEY_" | while read DEF NAME VALUE COMMENTS; do
@@ -62,12 +33,11 @@ cat "$LOCAL_INPUT_HEADER" | grep "^#define[[:space:]]*KEY_" | while read DEF NAM
ALIAS="false"
fi
- echo " { \"$NAME\", $NAME, $ALIAS, NULL }," >> "$OUTPUT_MAPC"
+ echo " { \"$NAME\", $NAME, $ALIAS, NULL }," >> "$OUTPUT_MAPH"
done
-cat >> "$OUTPUT_MAPC" << EOF
+cat >> "$OUTPUT_MAPH" << EOF
{ NULL, 0, false, NULL }
-};
EOF
exit 0