How to prepare touchscreen-based Android device for [emergency] calling using only hardware buttons?
I started implementing my own solution for my device.

Here (source) is a program that (started as root) will allow you to start shell scripts using series of button presses. Currently having started this monitor ( andrhard 66 /h/andrhard &lt; /dev/input/event2&amp;) I can easily toggle the flashlight without unlocking the phone (using /sys/class/leds/lv5219lg:fled/brightness)

Now the problems is how to call/answer from shell scripts...