soniox/rdev ? reverse-engineered prompt
Reverse engineered prompt
Build me a small Rust library that can watch global keyboard and mouse activity and also send keyboard and mouse events back to the system on Mac, Windows, and Linux.
I want it to let me listen for input events in a callback, with each event including the time it happened, what kind of event it was, and the typed character when that makes sense. I also want a way to simulate key presses, mouse moves, clicks, and wheel scrolling, plus a simple helper to get the main screen size. Add a tiny keyboard helper that can turn key presses into text based on the current layout.
If it makes sense, include an optional mode for intercepting and blocking input before it reaches other apps, and make it serializable too. Please keep the API clean and easy to use, and make sure it works across the supported platforms with the right caveats handled as well as possible.