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 coordinate information of the virtual key in/sys/board_properties/by the configuration information defined in the Tpd_custom_xxx.h file. The VIRTUALKEYS.MTK-TPD.
At work. TP Driver The coordinates of the point at which it was pressed to escalate. The upper Android will read the key configuration information in sys. Then infer whether the escalated coordinates belong to the coordinate range of a key, which translates the coordinate information into a detailed key key value.
2. Under Factory mode and recovery mode, because Android has not yet started. Therefore, the key event cannot take 1 of the escalation mechanism. Instead, the Tpd_button () function is used to directly escalate the key.
So, 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?