It is necessary to track the cursor as in games (from the first person for example), without any restrictions, but there is a problem:

  1. I don’t know how to track down the browser chapels (except for how to click and put it on the screen, then everything works, but you need to have it with normal traffic)

  2. even if we successfully pass 1 point, then here we are hampered by the screen which does not let the mouse over the screen.

Maybe someone knows how to do this? In fact, you can probably assume: not to catch coordinates, but just where it went and how many and do coordinates in variables that will not apply to the cursor, but I don’t know how to listen to it.

    1 answer 1

    If you press and hold the mouse button, such as dragging off the page, outside the window, then mouse events (mouseup, mousemove) will still be received by the object. Try to reduce the window here , click in the game area and without releasing the button to bring the cursor outside the window. This is done so that D & D works. In IE and FF, there have been questions with this, but now everything seems to be working. Well, if you just drive a mouse, I think it’s impossible to catch it from the browser without installing plug-ins.

    • Well, when I click, it works, I know. Oh, the whole thing is that you get cords with the button pressed, so he can catch behind the browser - Gotha
    • earlier when Unity applications in the browser through the plugin (Unity Player) worked - the plugin caught all the events, and if only through the browser - it was done like that, it is unlikely ... - Eugene Bartosh
    • one
      I had to do something similar, though it was not a client program, but a demo, it was done this way: - on a machine under Ubuntu, apache + node + .js were installed locally - the web application spoke only with local resources - the program on node.js read the mouse with using XDOTOOLS and pushing a web application, it's easy when everything is local and you can determine that the host is (xdotools, etc.) - Eugene Bartosh
    • in principle, I’m on a local server, so if I don’t get very foiled then I don’t mind connecting to something, but I would just like to know how to implement this without any settings - Gotha