AnsweredAssumed Answered

怎样才能用触屏移动光标?

Question asked by jiang shao on Sep 15, 2014
Latest reply on Sep 25, 2014 by Yanjun Luo

连接触摸屏到sabresd_6dq-eng(android 4.2.2),可以点按,但是无法移动光标。

(也就是说无论在触屏的何处按下,只要鼠标不移动,屏幕上总是在同一位置显示一个圆圈)

怎样才能实现光标的移动?

 

通过getevent,点按左上角,可以看到如下信息

/dev/input/event2: 0003 0003 0000009d 绝对坐标 ABS_RX 157

/dev/input/event2: 0003 0004 00000118 绝对坐标 ABS_RY 280

/dev/input/event2: 0000 0000 00000000 EV_SYNC SYN_REPORT

/dev/input/event2: 0004 0004 00090001 EV_MSC ?

/dev/input/event2: 0001 0110 00000001 按键 鼠标左键 按下

/dev/input/event2: 0000 0000 00000000 EV_SYNC SYN_REPORT

/dev/input/event2: 0004 0004 00090001 EV_MSC ?

/dev/input/event2: 0001 0110 00000000按键 鼠标左键 抬起

/dev/input/event2: 0000 0000 00000000 EV_SYNC SYN_REPORT

 

通过cat /proc/bus/input/devices

可以看到如下信息:

I: Bus=0003 Vendor=227d Product=010a Version=0111

N: Name="UNITEC USB Touch (WinXP&7)"

P: Phys=usb-fsl-ehci.1-1.4.2/input0

S: Sysfs=/devices/platform/fsl-ehci.1/usb2/2-1/2-1.4/2-1.4.2/2-1.4.2:1.0/input/i

nput12

U: Uniq=

H: Handlers=mouse1 event2 cpufreq_interactive

B: PROP=0

B: EV=1b

B: KEY=fff 0 30000 0 0 0 0 0 0 0 0

B: ABS=7ff00 1ffffff

B: MSC=10

 

通过dumpsys input可以看到如下信息:

Device 13: UNITEC USB Touch (WinXP&7)

    Generation: 54

    IsExternal: true

    Sources: 0x00006002

    KeyboardType: 0

    Motion Ranges:

      X: source=0x00006002, min=0.000, max=1919.000, flat=0.000, fuzz=0.144

      Y: source=0x00006002, min=0.000, max=1079.000, flat=0.000, fuzz=0.141

      PRESSURE: source=0x00006002, min=0.000, max=1.000, flat=0.000, fuzz=0.000

    Touch Input Mapper:

      Parameters:

        GestureMode: spots

        DeviceType: pointer

        AssociatedDisplay: hasAssociatedDisplay=true, isExternal=false

        OrientationAware: false

      Raw Touch Axes:

        X: min=0, max=13311, flat=0, fuzz=0, resolution=0

        Y: min=0, max=7679, flat=0, fuzz=0, resolution=0

        Pressure: min=0, max=7679, flat=0, fuzz=0, resolution=0

        TouchMajor: unknown range

        TouchMinor: unknown range

        ToolMajor: unknown range

        ToolMinor: unknown range

        Orientation: unknown range

        Distance: unknown range

        TiltX: unknown range

        TiltY: unknown range

        TrackingId: unknown range

        Slot: unknown range

      Calibration:

        touch.size.calibration: none

        touch.pressure.calibration: physical

        touch.orientation.calibration: none

        touch.distance.calibration: none

      Viewport: displayId=0, orientation=0, logicalFrame=[0, 0, 1920, 1080], phy

sicalFrame=[0, 0, 1920, 1080], deviceSize=[1920, 1080]

      SurfaceWidth: 1920px

      SurfaceHeight: 1080px

      SurfaceLeft: 0

      SurfaceTop: 0

      SurfaceOrientation: 0

      Translation and Scaling Factors:

        XTranslate: 0.000

        YTranslate: 0.000

        XScale: 0.144

        YScale: 0.141

        XPrecision: 6.933

        YPrecision: 7.111

        GeometricScale: 0.142

        PressureScale: 0.000

        SizeScale: 0.000

        OrientationScale: 0.000

        DistanceScale: 0.000

        HaveTilt: false

        TiltXCenter: 0.000

        TiltXScale: 0.000

        TiltYCenter: 0.000

        TiltYScale: 0.000

      Last Button State: 0x00000000

      Last Raw Touch: pointerCount=0

      Last Cooked Touch: pointerCount=0

      Pointer Gesture Detector:

        XMovementScale: 0.115

        YMovementScale: 0.115

        XZoomScale: 0.043

        YZoomScale: 0.043

        MaxSwipeWidth: 3842.132812

  Configuration:

    ExcludedDeviceNames: []

    VirtualKeyQuietTime: 0.0ms

    PointerVelocityControlParameters: scale=1.000, lowThreshold=500.000, highThr

eshold=3000.000, acceleration=3.000

    WheelVelocityControlParameters: scale=1.000, lowThreshold=15.000, highThresh

old=50.000, acceleration=4.000

    PointerGesture:

      Enabled: true

      QuietInterval: 100.0ms

      DragMinSwitchSpeed: 50.0px/s

      TapInterval: 150.0ms

      TapDragInterval: 300.0ms

      TapSlop: 20.0px

      MultitouchSettleInterval: 100.0ms

      MultitouchMinDistance: 15.0px

      SwipeTransitionAngleCosine: 0.3

      SwipeMaxWidthRatio: 0.2

      MovementSpeedRatio: 0.8

      ZoomSpeedRatio: 0.3

Outcomes