zoukankan      html  css  js  c++  java
  • 【Android】输入设备配置文件(.idc文件)

    何为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文件。

    idc例子

           实验的触摸屏设备的idc文件位于:/system/usr/idc目录下,文件名为:Vendor_5697_Product_0008.idc,其内容如下:

     1 # Filename:Vendor_5697_Product_0008.idc  
     2 # My TouchScreen Device configuration file.  
     3 #  
     4   
     5 touch.deviceType = touchScreen  
     6 touch.orientationAware = 1  
     7   
     8 keyboard.layout = Vendor_5697_Product_0008  
     9 keyboard.orientationAware = 1  
    10   
    11 cursor.mode = navigation  
    12 cursor.orientationAware = 1 

       当然,在驱动程序中,驱动的name为:Vendor_5697_Product_0008,即input_dev结构的name成员值为:Vendor_5697_Product_0008

    idc访问路径及文件名规则

      下列路径被依次访问:

    • /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

     

    参考

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

      http://source.android.com/tech/input/touch-devices.html

      http://blog.csdn.net/myarrow

  • 相关阅读:
    用于图片处理的10个超级jQuery插件
    [VS2010].NET4.0环境下使用.NET2.0程序集,出现“混合模式程序集异常”
    对企业虚拟化应用的一些感受[原创]
    留学生不回国:中国物价超美国 没车没房没尊严!
    Research Assembly Setting!
    [转] 微软的软件测试方法(附读后感)
    应用 ZedGraph
    [转] LOGIGEAR SECURITY POLICIES
    一道程序运行结果题
    VS05 与 VS08并存时编译出现 The binding handle is invalid.
  • 原文地址:https://www.cnblogs.com/lcw/p/3345077.html
Copyright © 2011-2022 走看看