summaryrefslogtreecommitdiff
path: root/config/gen_positions.sh
diff options
context:
space:
mode:
Diffstat (limited to 'config/gen_positions.sh')
-rwxr-xr-xconfig/gen_positions.sh17
1 files changed, 17 insertions, 0 deletions
diff --git a/config/gen_positions.sh b/config/gen_positions.sh
new file mode 100755
index 0000000..b83ca9d
--- /dev/null
+++ b/config/gen_positions.sh
@@ -0,0 +1,17 @@
+#!bash
+
+if [[ $# -ne 1 ]]; then
+ echo "Usage: $0 <keypos file>" 1>&2
+fi
+
+f="$1"
+
+echo -n "#define LEFT"
+grep "#define " $f | awk '$2 ~ /^L[^H]/ { printf(" %s", $2) }'
+echo
+echo -n "#define RIGHT"
+grep "#define " $f | awk '$2 ~ /^R[^H]/ { printf(" %s", $2) }'
+echo
+echo -n "#define THUMBS"
+grep "#define " $f | awk '$2 ~ /^.H/ { printf(" %s", $2) }'
+echo