Android 触摸和鼠标模式切换

Android os : > 4.0

Android 4.0以后,触摸屏的触摸模式和鼠标模式使用idc文件来做切换。 需要把触摸屏设备的相应idc文件放到 /system/usr/idc/ 目录下。 如下是IRTOUCH Vendor_6615_Product_0085.idc文件的内容:

 # Copyright (C) 2012 Beijing IRTOUCH SYSTEMS Co.,Ltd
    #
    #
    # Input Device Configuration File for the IRTOUCH touch screen.
    #

    #common
    device.internal = 1 

    # Basic Parameters
    touch.deviceType = touchScreen
    touch.orientationAware = 1 

    # Size
    touch.size.calibration = diameter
    touch.size.scale = 10
    touch.size.bias = 0 
    touch.size.isSummed = 0 

    # Pressure
    touch.pressure.calibration = amplitude
    touch.pressure.scale = 0.005

    # Orientation
    touch.orientetion.calibration = none