1. Under normal mode, the TP button is also reported as a input_event in coordinates, as in other touch events. The tpd_button_setting () function is initialized to write the virtual key's coordinate information in/sys/board_properties/according to the configuration information defined in the Tpd_custom_xxx.h file. The VIRTUALKEYS.MTK-TPD. At work, TP driver will press the coordinates of the point to escalate, the Android upper layer will read the key configuration information sys, and then determine whether the escalated coordinates belong to a key coordinate range, in order to convert the coordinate information into a specific key key value.
2. Under Factory mode and recovery mode, since Android has not yet started, key events cannot take the escalation mechanism in 1, but instead use the Tpd_button () function to directly escalate the keys.
Therefore, for normal mode, the key event does not need to call the Tpd_button () function to escalate, while in Factory mode and recovery mode, the Tpd_button () function must be called to escalate the virtual key event.
What is the mechanism by which Android virtual keys are reported?