The mapping of the keypad’s operation can be set by using the “button_map” boot argument. The key label’s number is used as the first parameter. The second parameter specifies the operation, with the third and fourth parameters setting the corresponding values of the operation. The buttons can also be mapped to mouse functionality or touchscreen points instead of normal key inputs.
button_map=[KEY] : [type] : [value1] : [value2]
For example, to map the KEY0 input to a mouse left click and the KEY1 to a touching coordinates x=200, y=200, the parameters would be:
The X-Y coordinates of the touchscreen are tuned for an HDMI screen resolution of 1280×720.
If you are using a different resolution such as 1920×1080,the coordinates must be changed.
You can obtain the coordinates for a touch input by enabling the “Settings” → “Developer options” → “Pointer location” setting on Android.