summaryrefslogtreecommitdiffstats
path: root/firmware/target/hosted/android/app/android_keyevents.sh
diff options
context:
space:
mode:
Diffstat (limited to 'firmware/target/hosted/android/app/android_keyevents.sh')
-rwxr-xr-xfirmware/target/hosted/android/app/android_keyevents.sh9
1 files changed, 9 insertions, 0 deletions
diff --git a/firmware/target/hosted/android/app/android_keyevents.sh b/firmware/target/hosted/android/app/android_keyevents.sh
new file mode 100755
index 0000000000..cd654ad01e
--- /dev/null
+++ b/firmware/target/hosted/android/app/android_keyevents.sh
@@ -0,0 +1,9 @@
+#!/bin/sh
+# Simple script that converts Android's KEYCODE_* ints to preprocessor #defines
+
+URL="http://android.git.kernel.org/?p=platform/frameworks/base.git;a=blob_plain;f=core/java/android/view/KeyEvent.java;hb=HEAD"
+
+echo "Processing $URL..."
+(echo "/* Ripped from $URL */";
+ curl $URL | grep "public static final int KEYCODE" | sed 's/^.*public static final int \(KEYCODE_.*\) *= *\([0-9]*\).*$/#define \1 \2/'
+) > `dirname $0`/android_keyevents.h