I'm currently working on a Synergy (http://sourceforge.net/projects/synergyandroid/, synergy-foss.org) port to the android phone. I have keystrokes working -- I'm writing the key events to /dev/uinput. However I have been unsuccessful in getting the mouse cursor to show up. I've tried writing a mouse move by writing an EV_REL input_event to /dev/uinput but I presume there's something else I must activate to display the cursor. I've seen videos of a Cyanogen modded phone & a bluetooth mouse with cursor... so I presume it's possible. Does anyone have any information on this?
Asked
Active
Viewed 1,126 times
1
-
Really good idea, i'm waiting testing it :). Have you try to catch the TouchEvent ? – ykatchou Oct 30 '10 at 18:10
-
I'm just writing the client not the server at the moment. So I think the TouchEvent would only come in handy for the server side – Shaun Oct 30 '10 at 18:42
1 Answers
1
So I essentially found out how to display and move the cursor with relative mouse movements. I have not been able to find a method of determining the mouse cursor position.
Using dev/uinput turn on relative mouse positioning via:
ioctl (uinput_fd, UI_SET_EVBIT, EV_REL)
and then (this was the part I missed initially)
for(i=REL_X;i<REL_MAX;i++)
ioctl(uinput_fd,UI_SET_RELBIT,i);

Shaun
- 3,777
- 4
- 25
- 46
-
Is it possible to get a mouse cursor to display in vanilla Android (which has uinput available or installable), or is the ability to draw the cursor specific to the modded phone? – user48956 Jul 22 '11 at 17:44