tomxue/catch_touch_coordinates
Folders and files
| Name | Name | Last commit date | ||
|---|---|---|---|---|
Repository files navigation
catch_touch.c
For N900 touch panel detection
Utility
Tom Ubuntu
$ sudo lsinput
/dev/input/event0
bustype : BUS_HOST
vendor : 0x0
product : 0x1
version : 0
name : "Power Button"
phys : "LNXPWRBN/button/input0"
bits ev : EV_SYN EV_KEY
/dev/input/event1
bustype : BUS_I8042
vendor : 0x1
product : 0x1
version : 43841
name : "AT Translated Set 2 keyboard"
phys : "isa0060/serio0/input0"
bits ev : EV_SYN EV_KEY EV_MSC EV_LED EV_REP
/dev/input/event2
bustype : BUS_I8042
vendor : 0x2
product : 0x5
version : 0
name : "ImPS/2 Generic Wheel Mouse"
phys : "isa0060/serio1/input0"
bits ev : EV_SYN EV_KEY EV_REL
test_mouse.c
Purpose: to detect the mouse action: click, move...
TestBench
Tom's PC_Ubuntu and BB_Ubuntu
cannot provide the coordinates of mouse click position
HTC Sensation XE: can provide the real coordinates as value shown
begin handel_event0...
The sizeof struct input_event is: 16
event(0): type: 3; code: 48; value: 13; realx: 0; realy: 0
event(1): type: 3; code: 50; value: 13; realx: 0; realy: 0
event(2): type: 3; code: 58; value: 13; realx: 0; realy: 0
event(3): type: 3; code: 53; value: 947; realx: 0; realy: 0
event(4): type: 3; code: 54; value: 897; realx: 0; realy: 0
event(5): type: 0; code: 2; value: 0; realx: 0; realy: 0
event(6): type: 0; code: 0; value: 0; realx: 0; realy: 0
end handel_event0...
simulate_mouse_key.c
TestBench
Tom's PC_Ubuntu
Capbility
Currently it can simulate the key event: to press key "a" and output it to shell
Run
sudo ./a.out
TestBench
BB_Ubuntu
Capability
can simulate both keyboards and mouse
script
TestBench
HTC Sensation XE
can partially trigger the touch click action
but with drag, not totally same
uinput-sample.c
TestBench
PC_Ubuntu
can simulate the mouse movement
cannot simulate the key press action