1

What I am looking for is a way to prevent a pointer device (specifically the pen of a graphics tablet) from being used as a regular input pointer by X11 or Wayland. However, I would like to still be able to evaluate clicks and moves in my program. So basically tie the output of that pen to my application, ideally regardless of whether it has focus or not.

Under X11, devices can be set "floating", which prevents these from being used as generic input device, but I am not sure whether the same can be done in Wayland and how.

What is the best way to achieve this?

1 Answer 1

1

Have you tried xinput

xinput will output a list of input devices to X example output

Virtual core pointer id=2 [master pointer (3)] ↳ Virtual core XTEST pointer id=4 [slave pointer (2)] ↳ USB Optical Mouse id=8 [slave pointer (2)]

then use 'xinput -disable 8' to disable the optical mouse for X

You will be able to recieve the input from /dev/input/event* files, e.g. trying 'evtest' utility for your application!

For wayland, there seems to be similar utilities, see for example the commands sway-input or maybe libinput, (but I could only find a disable function for sway-input...)

1
  • under X11, this works. But under wayland, I don't see the individual pointer devices using xinput. And with libinput, I can't create logical seats (or don't know how).
    – user52366
    Commented Apr 16 at 11:42

You must log in to answer this question.

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