Mouse events from multiple devices

Is there a way to determine which device triggered a mouse event? For instance, I’d like to use an extra trackpad as a MIDI controller. How can I know if a mouse movement is coming from the trackpad? Is there another way to read from the trackpad without it looking like a mouse?

Thanks.

Are-you seeking the MouseEnter Event ?

Please, define what you mean by “devices” in Xojo.

There’s no way to do this in Xojo natively. On macOS, you might be able to figure it out with Declares but I wouldn’t count on it for pointer location - looks like you might be able to distinguish scroll events and possibly gestures, though.

If you have the MBS plugins you might be able to retrieve the event and look at its subtype.