linuxserver/gclient

mouse.onmousemove not working

snaca opened this issue · 3 comments

snaca commented

Hi,

Thanks for your perfect job, but when I use an Android Pad with a bluetooth mouse to access the system, I found the bluetooth mouse not work, hide cursor and can't move, I can only use the touch screen to move the cursor.

code is below:

// Mouse
var mouse = new Guacamole.Mouse(guac.getDisplay().getElement());
mouse.onmousedown =
mouse.onmouseup =
mouse.onmousemove = function(mouseState) {
guac.sendMouseState(mouseState);
/////////////////////////////////////////////////////
alert(); // only click show the alert window, move the mouse don't show, it seems the onmousemove event not be catched.
/////////////////////////////////////////////////////
};
// Touchscreen
var touch = new Guacamole.Mouse.Touchpad(guac.getDisplay().getElement());
touch.onmousedown =
touch.onmouseup =
touch.onmousemove = function(mouseState) {
guac.sendMouseState(mouseState);
};

BTW, I use this bluetooth mouse on a PC, it works.

I am not sure how mobile devices register a mouse in a mobile browser it must be an emulated touch thing that is different than a normal mouse cursor.
I don't have a tablet to test this on, but will try to dig into it when I get time.

Touch move works now in the latest version, but click and drag is not there yet. It is on my radar.

I wrote the touch controls from scratch, should have full mobile compatibility now.

download.mp4