I can check the NSScrollWheel event from a mouse or a trackpad:
Mac Cocoa: How to differentiate if a NSScrollWheel event is from a mouse or trackpad?
But it is possible to check a mouse click, also a NSEvent is from a mouse or trackpad? Thanks.
I can check the NSScrollWheel event from a mouse or a trackpad:
Mac Cocoa: How to differentiate if a NSScrollWheel event is from a mouse or trackpad?
But it is possible to check a mouse click, also a NSEvent is from a mouse or trackpad? Thanks.
You should be able to check "event.subtype" to see from which device it came.
If it's a mouse, the "subtype" value should be NSMouseEventSubtype. If it's not a mouse, the value will be something else (e.g.: NSApplicationActivatedEventType or NSTouchEventSubtype).