连接触摸屏到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
How can move cursor by touch-screen
I connected a touch-screen to sabresd_6dq-eng(android 4.2.2).
I can touch, but I can't move cursor.
(That is to say, no matter where in the touch screen by pressing, as long as the mouse is not moving,
always in the same location on the screen shows a circle)
How can move cursor by touch-screen?
use getevent command,press the left-up,I can see the following messages.
/dev/input/event2: 0003 0003 0000009d EV_ABS ABS_RX 157
/dev/input/event2: 0003 0004 00000118 EV_ABS 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 EV_KEY BTN_MOUSE down
/dev/input/event2: 0000 0000 00000000 EV_SYNC SYN_REPORT
/dev/input/event2: 0004 0004 00090001 EV_MSC ?
/dev/input/event2: 0001 0110 00000000 EV_KEY BTN_MOUSE up
/dev/input/event2: 0000 0000 00000000 EV_SYNC SYN_REPORT
use cat /proc/bus/input/devices
I can see the following messages.
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
use dumpsys input,
I can see the following messages.
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
this may useful for you Re: White ring round a touch point in Android on i.MX6
Thank you for your reply,
I tried it yesterday, found that do not show white circles,
but the touch-screen don't work anymore.:smileycry:
I fixed similar problem before, you can check here.
非常感谢你的回答。
我英语比较烂,就用中文了。
冒昧地问下能否再说得详细些?
作为初学者有点看不明白。
另外根据jimmychan的回答我写过一个Vendor_227d_Product_010a.idc
touch.deviceType = touchScreen
touch.orientationAware = 1
touch.size.calibration = none
touch.orientation.calibration = none
接上后确实不显示白色圆圈了,但是触屏也不工作了。。。
I'm new to Android too, change the idc may works, but I don't know, my way is set the INPUT_PROP_DIRECT when you register the touch panel device. I mean, you must change the kernel driver code to do it. I saw the same result as you first, after I set the INPUT_PROP_DIRECT, it just works as touch panel. Then I add some calibration later because I'm using resistive touch and it works very well now.
Here is my code for your reference.
set_bit(INPUT_PROP_DIRECT, input_dev->propbit);
BTW, I'm working on touch panel wakeup the Android now, there is long way to go.