Another method exists, and like you indicated, it requires at the very least root access and possibly a custom ROM.
Hook your device up to a computer via adb.
Pull your keypad.kl file. For my HTC EVO 4G, it was
/system/usr/keylayout/supersonic-keypad.kl
, regardless of what it
is called, you should find it somewhere close to
/system/usr/keylayout
Open this file with a text editor, and edit as you please following
the pattern of the file.
For me, the HOME button is 102
, so remapping this key to the camera would be key 102 CAMERA WAKE_DROPPED
.
A key marked WAKE
will wake the device when it is pressed, WAKE_DROPPED
can affect the system without waking the screen.
NOTE: this may only allow you to change the functionality to built-in options, but there are several functions available, including volume options, other softkeys, camera, power, any characters, or playback controls, such as PLAYPAUSE
.
This is the Android source and includes example keymaps.