3 ms·
I maintain a library to simulate input on Windows, macOS and Linux. There are a ton of quirks on all of these platforms. On Windows you can simulate text input.
by pentamassiv 2y ago
I maintain a library to simulate input on Windows, macOS and Linux. There are a ton of quirks on all of these platforms. On Windows you can simulate text input. The text cannot start with a new line character though. It is perfectly fine if it's not the first one though. macOS also allows you to simulate text input, but the text has to be shorter than 21 characters. Linux is especially difficult with X11, multiple Wayland protocols and libei.
- Scramblejams 2y agoIf it's available, I'd love a link.
- pentamassiv 2y agoOf course: https://crates.io/crates/enigo https://crates.io/crates/enigo
- lostmsu 2y agoDoes this use SendInput on Windows or injects directly into the app?
- pentamassiv 2y agoIt uses SendInput: https://github.com/enigo-rs/enigo/blob/main/src/win/win_impl.rs#L37 https://github.com/enigo-rs/enigo/blob/main/src/win/win_impl...
- indrora 2y agoLook into contributing to LibTAS. It’s very Linux specific but can frame by frame manipulate the input that an application is getting, meant for speed runs of games.
- pentamassiv 2y agoThank you for the suggestion. It's an interesting project, but I'm more comfortable writing Rust code. Also I still have a lot to do for the library I'm maintaining. The libei and Wayland support is still experimental and buggy and I need to get better integration tests working. So much to do, so little time :-)