ScrollWheel - can we tell apart a mouse and trackpad?

Using a trackpad, I can make two finger drag scroll left/right or up/down

WIth a keyboard qualifier , I can make zoom work with the scrollwheel.

I have a customer who wants to make the scrollwheel effect left/right scrolling.
Is there a way to ‘know’ whether the events I get are coming from an actual wheel, versus a trackpad?

Those are usual UI combinations.

Scrollwheel = up/down
Scrollwhell + control = zoom+/-
Scrollwhell + shift = left/right