rockbox/firmware/target/hosted/android/app/android_keyevents.sh
Maurus Cuelenaere 934a5a5808 Android port: add support for hardware keys
* Forward Java KeyEvents to C layer and translate them to Rockbox BUTTON_*.
 * Add a basic Android keymap

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@27832 a1c6a512-1295-4272-9138-f99709370657
2010-08-16 20:12:06 +00:00

9 lines
452 B
Bash
Executable file

#!/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