A free program for Android, by sds100.
Key Mapper is an Android app that allows you to map certain physical keys to different actions. The app is very easy to use. You just have to install it on your Android device, configure the actions you want to assign to the keys, and you are ready to go.
Key Mapper supports both hardware and virtual keys. You can use the app to configure the key actions as you wish. You can assign one or more actions to each key. For example, you can assign a key to open your media player when you press it, open your camera when you press it, and open your gallery when you press it. You can also set it to open your home screen or lock screen, or open your notification panel or settings.
You can also set the order in which the actions are fired. For example, you can set it such that the action is fired first, and then you can set it such that the second action is fired only after the first action is finished.