rfb patch and mouse movement
G'day all,
I have shoehorned the latest rfb patch http://libvncserver.sourceforge.net/qemu/qemu-rfb9.patch.gz
into the latest CVS Qemu. I'm having a few issues at the moment with mouse calibration under Windows XP. (A few issues with keypresses not being passed on also, but I'm sure that is entirely to do with the way I have integrated the patch)
I recall at some point, someone was working on emulating a synaptic touchpad to enable non-relative mouse input. I was having a think. Years ago I wrote some windows userspace drivers for touchscreens. MicroTouch and ELOTouch from memory. I still have the code around somewhere.
It worked by taking the data from the touchscreen, running it through the relevant calibration routines and sending windows absolute mouse movement messages. It worked rather well.
What I was thinking was perhaps emulating a serial port touchscreen, which would work with any OS that had support for one of those screens. A serial port being dead easy to accurately emulate and the touchscreen protocols are super simple to work with. Only hitch being you only get a single button to play with. Perhaps we could use the touchscreen for movement only and send clicks over the ps2 interface.
Just a wildly meandering thought as I struggle to make this session of qemu with vnc workable with Windows XP.
Thoughts?
Brad
Quoted 4 lines · Brad Campbell
G'day all,
I'm having a few issues at the moment with mouse
calibration under Windows XP.
Every OS with mouse support, with the sole exception of ReactOS, has calibration problems. (At least, those OSes I've managed to test.) Why the mouse is perfectly calibrated in ReactOS, I have no idea.
Quoted 3 lines
I recall at some point, someone was working on emulating a synaptic touchpad to enable non-relative mouse input.
That was me. Turn out to be pointless, as you have the same scaling problem regardless of whether or not the mouse is in relative or absolute mode. And if you can fix the scaling problem, it's easier to stick with a PS/2 mouse, code-wise.
Quoted 7 lines
I was having a think. Years
ago I wrote some windows userspace drivers for touchscreens. MicroTouch and ELOTouch from memory. I still have the code around somewhere.It worked by taking the data from the touchscreen, running it through the relevant calibration routines and sending windows absolute mouse movement messages. It worked rather well.
What "relevant calibration routines" are we looking at here?
Quoted 3 lines
Perhaps we could use the touchscreen for movement only and send clicks over the ps2 interface.
That would require an ugly custom guest driver.
Quoted 3 lines
Just a wildly meandering thought as I struggle to make this session of qemu with vnc workable with Windows XP.
Does pressing Ctrl-Alt (or Ctrl-Shift??) to ungrab the mouse, then realiging the host and guest pointers, and then regrabing the mouse work? This is what I do w/ my no-sdl patch.
Quoted 11 lines
Thoughts?
Brad
_______________________________________________
Qemu-devel mailing list
[email protected]
http://lists.nongnu.org/mailman/listinfo/qemu-devel
Signature · 2 lines
Infinite complexity begets infinite beauty. Infinite precision begets infinite perfection.
Quoted 4 lines · Jim C. Brown
Quoted 1 line
It worked by taking the data from the touchscreen, running it through the relevant calibration routines and sending windows absolute mouse movement messages. It worked rather well.
What "relevant calibration routines" are we looking at here?
Pretty simple linear scaling and axis inversion for touchscreens. Nothing complex. Just calculate the max/min points based on some calibration, scale them up to 16 bit values and feed them to windows using a mouse movement message.
Quoted 4 lines
Quoted 1 line
Perhaps we could use the touchscreen for movement only and send clicks over the ps2 interface.
That would require an ugly custom guest driver.
Not really. Touchscreen drivers and mouse drives co-exist. Just send the movement down the touch screen line and the clicks down the PS2 line. Simple.
Quoted 6 lines
Quoted 1 line
Just a wildly meandering thought as I struggle to make this session of qemu with vnc workable with Windows XP.
Does pressing Ctrl-Alt (or Ctrl-Shift??) to ungrab the mouse, then realiging the host and guest pointers, and then regrabing the mouse work? This is what I do w/ my no-sdl patch.
I'm using VNC only, so there is no grab/un-grab.
Now I at least I have it working so it's not such an issue, but it is annoying. I'll think about it a bit more as it's getting serious daily use now.
Regards,
Brad
Quoted 19 lines · Brad Campbell
Quoted 6 lines · Jim C. Brown
Quoted 3 lines
It worked by taking the data from the touchscreen, running it through the relevant calibration routines and sending windows absolute mouse movement messages. It worked rather well.
What "relevant calibration routines" are we looking at here?
Pretty simple linear scaling and axis inversion for touchscreens. Nothing complex. Just calculate the max/min points based on some calibration, scale them up to 16 bit values and feed them to windows using a mouse movement message.
Quoted 4 lines
Quoted 2 lines
Perhaps we could use the touchscreen for movement only and send clicks over the ps2 interface.
Quoted 6 lines
Quoted 1 line
That would require an ugly custom guest driver.
Not really. Touchscreen drivers and mouse drives co-exist. Just send the movement down the touch screen line and the clicks down the PS2 line. Simple.
Hmm .. if hardware which uses this method already exists, then it's a different story.
Still, unless the calibration problem is solved, not worth the trouble.
Quoted 10 lines
Regards,
Brad_______________________________________________
Qemu-devel mailing list
[email protected]
http://lists.nongnu.org/mailman/listinfo/qemu-devel
Signature · 2 lines
Infinite complexity begets infinite beauty. Infinite precision begets infinite perfection.
Hi,
Quoted 9 lines · Jim C. Brown
Quoted 4 lines · Brad Campbell
G'day all,
I'm having a few issues at the moment with mouse
calibration under Windows XP.Every OS with mouse support, with the sole exception of ReactOS, has calibration problems. (At least, those OSes I've managed to test.) Why the mouse is perfectly calibrated in ReactOS, I have no idea.
I have: ReactOS does not do mouse acceleration, thus one tick from the mouse always corresponds to one pixel movement on the screen, whereas X11 on Linux normally accelerates the mouse, i.e. one thick means one pixel movement, but 10 ticks mean 20 pixels.
Quoted 1 line
That would require an ugly custom guest driver.
Agree. Maybe there's support in some Windows and some Linux versions, but it is yet another ugly dependency, which is not met by every guest.
Quoted 3 lines
Does pressing Ctrl-Alt (or Ctrl-Shift??) to ungrab the mouse, then realiging the host and guest pointers, and then regrabing the mouse work? This is what I do w/ my no-sdl patch.
This doesn't work yet with rfb9, because Ctrl-Alt doesn't alter the state, i.e. the mouse updates are still forwarded after pressing Ctrl-Alt, and even after a switch to the console or serial.
I want to rework the auto-calibration, but time's sparse. Also, somebody on the list mentioned that he was working on this himself, but he didn't answer my emails.
Ciao,
Dscho
Quoted 10 lines · Johannes Schindelin
Hi,
Quoted 6 lines · Jim C. Brown
Quoted 4 lines · Brad Campbell
G'day all,
I'm having a few issues at the moment with mouse
calibration under Windows XP.
Quoted 9 lines
Quoted 3 lines
Every OS with mouse support, with the sole exception of ReactOS, has calibration problems. (At least, those OSes I've managed to test.) Why the mouse is perfectly calibrated in ReactOS, I have no idea.
I have: ReactOS does not do mouse acceleration, thus one tick from the mouse always corresponds to one pixel movement on the screen, whereas X11 on Linux normally accelerates the mouse, i.e. one thick means one pixel movement, but 10 ticks mean 20 pixels.
Then, in theory, if we could tell the guest X11 server to not do acceleration, the problem would go away?
If so, that would also work for a Windows guest, tho the method of execution would probably be difficult.
Quoted 7 lines
Quoted 3 lines
Does pressing Ctrl-Alt (or Ctrl-Shift??) to ungrab the mouse, then realiging the host and guest pointers, and then regrabing the mouse work? This is what I do w/ my no-sdl patch.
This doesn't work yet with rfb9, because Ctrl-Alt doesn't alter the state, i.e. the mouse updates are still forwarded after pressing Ctrl-Alt, and even after a switch to the console or serial.
Is this due to a limitation of VNC (in which case we might say, Ctrl-A Ctrl-A does the switch), or is it merely due to a lack of support in the code (that someone else could add easily by adding a few lines of code)?
Quoted 15 lines
I want to rework the auto-calibration, but time's sparse. Also, somebody on the list mentioned that he was working on this himself, but he didn't answer my emails.
Ciao,
Dscho_______________________________________________
Qemu-devel mailing list
[email protected]
http://lists.nongnu.org/mailman/listinfo/qemu-devel
Signature · 2 lines
Infinite complexity begets infinite beauty. Infinite precision begets infinite perfection.
Hi,
Quoted 2 lines · Jim C. Brown
Then, in theory, if we could tell the guest X11 server to not do acceleration, the problem would go away?
Yes. I tested this with Windows 98 and ME, but I am dumb enough not to know how to do that with X11.
Quoted 2 lines
If so, that would also work for a Windows guest, tho the method of execution would probably be difficult.
Start/Preferences/Mouse Settings/Acceleration, set to "None".
Quoted 11 lines
Quoted 7 lines
Quoted 3 lines
Does pressing Ctrl-Alt (or Ctrl-Shift??) to ungrab the mouse, then realiging the host and guest pointers, and then regrabing the mouse work? This is what I do w/ my no-sdl patch.
This doesn't work yet with rfb9, because Ctrl-Alt doesn't alter the state, i.e. the mouse updates are still forwarded after pressing Ctrl-Alt, and even after a switch to the console or serial.
Is this due to a limitation of VNC (in which case we might say, Ctrl-A Ctrl-A does the switch), or is it merely due to a lack of support in the code (that someone else could add easily by adding a few lines of code)?
This is a limitation of the author ;-) Seems like a good idea, though.
Ciao,
Dscho
Le Mon, 17 Jan 2005 19:02:53 +0100, Johannes Schindelin a écrit :
Quoted 10 lines
Hi,
Quoted 2 lines · Jim C. Brown
Then, in theory, if we could tell the guest X11 server to not do acceleration, the problem would go away?
Yes. I tested this with Windows 98 and ME, but I am dumb enough not to know how to do that with X11.
$xset m 0
or
-a 0 passed to the X server
Quoted 2 lines
Ciao,
Dscho
Hi,
Quoted 9 lines · Ronald
Le Mon, 17 Jan 2005 19:02:53 +0100, Johannes Schindelin a écrit :
Quoted 3 lines
Yes. I tested this with Windows 98 and ME, but I am dumb enough not to know how to do that with X11.
$xset m 0
or
-a 0 passed to the X server
Thank you for not letting me die dumb!
Ciao,
Dscho