There are similar questions on this site, but my scenario is bit different.

I have an additional mouse; lets call it X. I use a python script to read X movement (read /dev/input/mouse1) which I use to control an embedded device. However I do not want the pointer to move when X moves.

Is there a way to disable only the mouse pointer and not its events?

1 Answer 1


You can use xinput to remove your mouse from the Virtual core pointer. In that way the mouse cursor (" core pointer") won't be controlled any longer by it, and the core protocol won't produce any mouse events.

You can still receive the mouse events either on the input layer, as you are already doing (via /dev/input). Note that this is not X movement, but one layer below (before evdev or similar X drivers process it).

Or you can receive X input events for the detached mouse using the XINPUT X extension. See xinput --test and xinput --test-xi2 for an example program that does that.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .