What is the mechanism by which Android virtual keys are reported?

Source: Internet
Author: User
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?

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.