Input Device Configuration

本文介绍了Android系统的IDC(Input Device Configuration)文件的作用及其配置规则。IDC文件用于定义输入设备的具体行为,尤其对于touchscreen设备至关重要。文章还提供了IDC文件的示例,并解释了如何在Android系统中定位这些文件。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >



I.IDC

       IDC(Input Device Configuration)为输入设备配置文件,它包含设备具体的配置属性,这些属性影响输入设备的行为。对于touch screen设备,总是需要一个idc文件来定义其行为。

       Android基于输入设备驱动汇报的事件类型和属性来检测和配置大部分输入设备的能力。然而有些分类是模棱两可的,如:多点触摸屏(multi-touch touch screen)和touch pad都支持EV_ABS事件类型和ABS_MT_POSITION_X和ABS_MT_POSTION_Y事件,然而这两类设备的使用是不同的,且不总是能自动判断。所以,需要另外的信息来指示设备上报的pressrue和size信息的真正含义。因为,触摸设备,特别是内嵌的touch screen,经常需要idc文件。


II. IDC访问路径及文件名规则
下列路径被依次访问:

MTK:
/system/usr/idc/Vendor_XXXX_Product_XXXX_Version_XXXX.idc
/system/usr/idc/Vendor_XXXX_Product_XXXX.idc
/system/usr/idc/DEVICE_NAME.idc
/data/system/devices/idc/Vendor_XXXX_Product_XXXX_Version_XXXX.idc
/data/system/devices/idc/Vendor_XXXX_Product_XXXX.idc
/data/system/devices/idc/DEVICE_NAME.idc

展讯:
sprd/device/sprd/ProjectName/*.idc


III. 例子

# This is an example of an input device configuration file.
# It might be used to describe the characteristics of a built-in touch screen.

# This is an internal device, not an external peripheral attached to the USB
# or Bluetooth bus.
device
.internal= 1

# The device should behave as a touch screen, which uses the same orientation
# as the built-in display.
touch
.deviceType = touchScreen
touch
.orientationAware =1


# Additional calibration properties...
# etc...


IV. 参考

http://source.android.com/devices/input/input-device-configuration-files.html

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值