934a5a5808
* 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
9 lines
452 B
Bash
Executable file
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
|