The InputDeviceCapabilities API provides details about the physical device responsible for generating an event. InputDeviceCapabilities.firesTouchEvents returns whether this device dispatches touch events. All types of UIEvent now have their own sourceCapabilities attribute which returns the InputDeviceCapabilities associated with the physical device responsible for them.
Docs: https://developers.google.com/web/updates/2015/10/inputdevicecapabilities https://docs.google.com/document/d/1WLadG2dn4vlCewOmUtUEoRsThiptC7Ox28CRmYUn8Uw/edit https://developer.mozilla.org/en-US/docs/Web/API/InputDeviceCapabilities_API
Samples: https://developer.mozilla.org/en-US/docs/Web/API/InputDeviceCapabilities_API