I would like to listen to events from two different input devices, a mouse and a drawing tablet without them interfering: different events when the mouse is moved or clicked and different events then the stylus is moved or pressed.
Is that possible or does it have to with how the OS receives data from the devices?
A drawing tablet connected to a computer acts like another mouse. It is the same as connecting a second mouse. Both mice would be controlling the same cursor. Thus, moving the mouse would be the same as moving the stylus, clicking with the mouse would be same as touching the tablet with the stylus. Depending on your setup, interactions with the stylus might be triggering touch events instead of mouse events.