A Rust library to get information about and from Multitouch devices (Trackpad / Magic Mouse) using the MultitouchSupport
framework.
Note: MultitouchSupport
is a private framework, and might not be ideal if you want to ship your app to the App Store.
- MacOS, unsure about the minimum version, but it works with 12, and 13.
Example:
let mut devices = MTDevice::devices();
devices.iter_mut().for_each(|d| {
d.listen(|dev, touches, fingers, timestamp, frame| {
println!("{touches:?}");
})
.unwrap();
});
cargo doc --open