#is there any built-in way to detect the trackpad using tauri apis?

3 messages · Page 1 of 1 (latest)

twilit marsh
#

using tauri as the wrapper for a pixi.js application that i'm working on. on the js side, i've run into a problem regarding trackpad detection - the only way i've discovered to detect the trackpad on the js side (found here: https://stackoverflow.com/questions/10744645/detect-touchpad-vs-mouse-in-javascript) seems either to be deprecated or incompatible with the native safari webview i'm developing on macos with.

is there any way to detect whether the user is using the trackpad or mouse at a given moment using tauri-apis instead?

iron hawk
#

Not as a feature built into Tauri but you could use any Rust library that reads input devices.

#

Most of the answers at that Stack Overflow link reference a deprecated event (mousewheel) but there is one macOS-specific answer that uses the standardised equivalent (wheel) event. Does that not work? Could you provide a bit more detail about what you expected that it doesn't do?