Hacker News new | past | comments | ask | show | jobs | submit login

I guess it depends on what level you're generating the events at. On Linux, it would be completely reasonable to inject the input events at the input device level.

https://www.kernel.org/doc/html/latest/input/event-codes.htm...

This is very straightforward (EV_REL) and requires a very small amount of code. There can be different problems to deal with when working at this level, but in my experience, everything works as expected with keyboards, mice, and gamepads.




That's the thing, it really depends on what you're trying to accomplish. If you're trying to move the mouse as if some remote program was a mouse attached to your computer, generating inputs makes sense. If you provide some kind of remote support application that just needs to make the mouse appear at the place the remote tech indicates, changing the raw cursor makes sense.

Both approaches are reasonable and both are implemented in desktop operating systems for this reason.




Consider applying for YC's W25 batch! Applications are open till Nov 12.

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: