I've made a Node/AutoHotKey script to control two computers with one mouse. I've made the cursor disappear on the first computer when using the second computer (https://www.autohotkey.com/boards/viewtopic.php?t=6167), but the mouseover event is still firing of course.
What I mean is simply if you hover over some icons on the desktop you will see tooltips, and so on.
I'm using a graphics tablet (absolute positioning), the cursor position gets captured and sent to the second computer.
I've found this method:
Found it here: https://www.autohotkey.com/boards/viewtopic.php?t=33128 (Also from the documentation: https://www.autohotkey.com/docs/commands/BlockInput.htm)
BlockInput, MouseMove ;to disable mouse interaction
BlockInPut, MouseMoveOff ;to enable mouse interaction
But it blocks mousemove completely, so that the cursor stops moving at all.
Is there any way to programmatically disable/enable mouseover (so that buttons don't change their color and tooltips don't appear, but AutoHotKey could still capture cursor position) event globally on Windows without blocking mousemove?
Related
My goal is to remap a physical device (Aimtrak Lightgun) which acts like a mouse, towards different button input (the X,Y are fine).
Currently the trigger registers as a right mouse click, but I want this to become a left mouse click.
I did follow the evdev tutorial, adjusting the "create uinput" and "injecting" parts.
There is no error, but the mouse is not moving or the button is not clicked.
So it would be fine to grab the device and control all the input.
But I am unable to make it work.
Any other approach is also welcome.
What happens is that I initiate the window drag instruction with Neutralino.window.setDraggableRegion, it works but there is a very big problem in rendering.
I am on a windows system. Here is a video of the problem:
Video of the problem
As you specified, the window is dragging but the mouse doesn't move with the point you click on, instead the mouse is at a different position.
I Looked at how draggable region function works under the hood, and it's handled by the JavaScript Client File, by setting the window position to the amount of mouse has moved on x and y.
since the mouse pointer doesn't move instead the window moves relative to the position from where you started clicking.
I will raise this issue, and soon a fix for this will be out!
Issue has been raised
I have a program using glfw for window management and opengl for rendering. The program works on Windows and linux, and eventually Mac OSX so I want any solution to be portable.
glfw seems to either support a cursor, or getting full mouse input but not both. For example, with the cursor enabled (default) the glfwscroll_callback does nothing. If I disable the cursor, then scrolling the mouse is captured but then the user cannot see where the mouse pointer is. That's ok if I can draw the cursor myself when I want but I cannot find any function to drawcursor at a particular location.
How does the cursor work, ie what is the hardware basis for the cursor? Is there a sprite in hardware still? If it's all in software, I suppose we could draw a cursor at the current mouse location the last thing in render. But that's not convenient. For one thing if the scene hasn't changed, I shut down rendering completely to reduce power.
Is there any way to manually draw a cursor on top of the current screen so that we don't have to manage the buffers manually? Is my only option to change the logic and not render the scene if nothing has changed, but to manually draw a cursor on top of the current scene every frame?
I have a Qt OpenGL (with qt 5.5) Application in which you can click to drag objects in a 3D scene.
This is implemented by having a subclass of QOpenGLWidget which overrides mousePressEvent, mouseReleaseEvent and mouseMoveEvent.
However, when I drag an object, I can move it for one frame before the window starts activating the window move mode, and my mouse movements actually start moving the whole window, as if I was dragging the title bar.
I suspect there is a conflict between the application and my window manager (kwin 5.4.3), but I don't know where to look at to debug this issue and whether it's my application's fault or if I have to fix my window manager.
You may need to call the accept() method of the event you are handling.
As the title states it: what software actually draws the mouse cursor? Is there a programmatic way for modifying the visual appearance?
The mouse cursor (or mouse pointer) is drawn by the X server. Each application that the cursor moves over may be able to modify the appearance of the mouse cursor.
Since there are different applications and those are built over different toolkits, each could use a different method for changing the cursor's appearance.
xterm uses the X library for manipulating this:
XDefineCursor
XRecolorCursor
XCreateFontCursor
xterm may choose a cursor-font which is small enough to hide the mouse pointer, but the X server continues to "draw" it.
Like other applications, xterm may also use cursor themes, which (in desktop systems such as GNOME, KDE, XFCE), may be configured in a desktop-settings.
But ultimately it is the X server which draws the mouse cursor. The application does not have to do anything to allow it to move around the screen. Rather, each application listens for X events to keep track of the mouse cursor.
Further reading:
How do I change the cursor from an arrow to a watch?
Cursor themes (Arch)
How do you hide the mouse pointer under Linux/X11?