RK3128 platform Android System modified add remote key value code value

Source: Internet
Author: User

recently help customers to customize the firmware of the RK3128 platform, involving the customization of the new remote control, you need to add or modify the remote code value. RK3128 platform android system to modify the remote control code value than the full Chi A20,a31s A little more trouble, in fact the same essence. The specific modification methods are as follows:

1 , first understand the condition of the remote control, including the remote control user code, the key value corresponding to the code value. Method:adb shell, input echo1 >/sys/module/rockchip_pwm_remotectl/parameters/code_ Print,

re-enter, CAT/PROC/KSMG , can also be done through the serial port.

The remote control to the light plate press, you will find the terminal interface reaction, will appear similar to the following information


which usercode= 0xff00 is the remote control user code, FA is the code value corresponding to the key.

2 , just press the remote control sequentially, recording all the keys and corresponding code values.

3 , enter Kernel /arch/arm/boot/dts directory, find Rk3128-box-rk88.dts file, the key value is defined in this, copied out of the editor.

4 , open DTS file, find the following method

which Usercode is the remote control user code, in this place to change your remote control user code such as (0XFF00) On the line, or in ir _key1{} Add a block of code behind the code block ir_key2{}, The same format.

key_table=Here is the code value and the corresponding key. Where, for example, a sixth key,0xecis the remote control code value that we press the remote key to get in front,KEY_menuis the name of the key we defined for the DELETE key above the remote control.KEY_menuThis key must be in theDEVICE/ROCKCHIP/RKSDKunder the directorymapped key-value file20050030_PWM.KLis defined, and this key must beKeyevent.javaCan be defined in the. We found20050030_PWM.KLThe file, open, will find the format defined inside the following:


we will find that the left is the number, the right is the name of the definition, DTS Direct Fill in Key_menu or 139 all right.

Note that the DELETE key defined here is Key 111 DEL , while DTS inside is DELETE, I do not know why, the definition of the same as not. If there is no matter how to change it, write 111 directly in the DTS file , this is the scan code.

These commonly used keys are the system to help define the good, if you have to add a button on the remote control swollen?

This is the time to customize the key. The simple way is to find a few of the system has defined the key, and the system is not used, and this key must be in the keyevent.java 20050030_pwm.kl file (different platforms this kl The file may be different), as defined by the format, such as #key 99    SYSRQ keyevent.java There is a definition, but do not know what to do, and it is useless, you can use it to define the function as a live key.

let's look at the system andFrameworks/base/core/java/android/view/keyevent.javaThere 's wood in it. Definition, findLinuxstandard Key-value command: inKerneldirectory under, input,Find.-name "*.h" |XargsGrep-r "SysRq",For example, the description system is defined


which About is the scan code.

the easier way is to change only one Phonewindowmanager . Java files, such as Setting The key is not used on the new remote control, you can replace this function directly to add the function (such as live).

The way to complicate the point is to add extra keys to the system, which has time to write a special article to describe.

5 , for the required keys, such as the remote control above a live button, in the previous steps defined, you need to frameworks/ Base/policy/src/com/android/internal/policy/impl/phonewindowmanager.java in this class interceptkeybeforedispatching (WindowState win, KeyEvent event, Intpolicyflags) This method intercepts and performs the corresponding function ( e.g. enter live).

all of the above methods are RK 3128 The system is the fastest way to modify or add remote control code value.

RK3128 platform Android System modified add remote key value code value

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.