Touchpad progamming

How to programme Touchpad/Trackpad in laptop using rust is there any api or lib available in rust

or

for programming touchpad should i need to develop driver something like that...

If you're writing apps for a GUI platform like Mac, Windows, or desktop Linux, then the windowing system and UI libraries should automatically translate touchpad input into mouse events and gesture events for your application to receive.

If you are writing for an embedded platform or if you need lower-level access to "raw" touch events from the trackpad, then some of these USB HID libraries might be useful. You might also need to look up documentation for your specific touchpad hardware or drivers.

1 Like

Most of the time the answer is: do it exactly the same way you would do it in C.

Find what OS libraries, system calls, or hardware you need to interface with. They're most likely to be C libraries, so you can use Rust's C FFI to interact with them. If you find that there is a specific library you need to use, search crates.io or https://lib.rs to see if there's a Rust wrapper for it already. If there isn't, make one.

1 Like

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.