android遥控按键字符串,android 下aml平台遥控器按键值key配置

Warning: Use of undefined constant gad_content_tag_filter_replace - assumed 'gad_content_tag_filter_replace' (this will throw an Error in a future version of PHP) in /usr/local/lighthouse/softwares/btpanel/wwwroot/www.mybacc.com/wp-content/plugins/web-ninja-google-analytics/webninja_ga.php on line 1813

1.查看键盘映射

getevent 获取event设备

root@android:/ # getevent

add device 1: /dev/input/event3

name:     “Microsoft  Microsoft Basic Optical Mouse v2.0 “

could not get driver version for /dev/input/mouse1, Not a typewriter

add device 2: /dev/input/event2

name:     “cec_input”

add device 3: /dev/input/event0

name:     “ScalarPolicy”

could not get driver version for /dev/input/mice, Not a typewriter

add device 4: /dev/input/event1

name:     “aml_keypad”

could not get driver version for /dev/input/mouse0, Not a typewriter

[ 8711.189102@0] fcode map = 0 press ircode = 0x0f, scancode = 0x006c

/dev/input/event1: 0001 006c 00000001

/dev/input/event1: 0000 0000 00000000

[ 8711.458565@0] fcode map = 0 release ircode = 0x0f, scancode = 0x006c

/dev/input/event1: 0001 006c 00000000

/dev/input/event1: 0000 0000 00000000

可以确定,使用的遥控输入设备是aml_keypad

dumpsys input

3: aml_keypad

Classes: 0x0000002b

Path: /dev/input/event1

Descriptor: 485d69228e24f5e46da1598745890b214130dbc4

Location: keypad/input0

UniqueId:

Identifier: bus=0x0010, vendor=0x0001, product=0x0001, version=0x0100

KeyLayoutFile: /system/usr/keylayout/Vendor_0001_Product_0001.kl

KeyCharacterMapFile: /system/usr/keychars/Generic.kcm

ConfigurationFile:

HaveKeyboardLayoutOverlay: false

获得使用的kl,查看对应的键值,例如:

key 61    CALL

key 97    DPAD_CENTER

key 232   DPAD_CENTER

key 108   DPAD_DOWN

key 103   DPAD_UP

key 102   HOME

key 105   DPAD_LEFT

key 106   DPAD_RIGHT

2.遥控器配置

查看遥控器spec,获取按键码值

映射上述的kl文件。

修改device/amlogic/g30ref/remote.conf

1.factorycode

遥控器的客户码,比如说客户码为00BD

factorycode =0xbd000001

后面固定为0001,前面记得位置换一下。

2.常用按键

left_key_scancode  = 0x49

right_key_scancode = 0x4a

up_key_scancode    = 0x0b

down_key_scancode  = 0x0f

ok_key_scancode    = 0x0d

根据遥控器的码值修改

3.键值映射区

key_begin

0x01 116

0x0f 113

0x6a 60

0x0b 103

0x0d 97

0x0f 108

0x49 105

0x4a 106

0x0a 139

0x55 102

0x54 158

0x0C 115

0x10 114

0x58 121

0x57 120

0x5e 102

0x5f 102

key_end

0x49 为遥控器码值,105为kl文件中left的key

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值