sidorares/node-x11

Can i reimplement `xdotool mousemove 200 100` with node-x11?

Closed this issue · 6 comments

xdotool is a nice X11 event emitter that can automatize user interaction.

I also would to freely simulate mouse clicks and keypress on X root to affect the pointed/focused window.

How could i do?

yes, you'll need to use xtest extension ( this is what xdotool is using )
see exampe here - https://github.com/sidorares/node-x11/blob/master/examples/smoketest/xtesttest.js#L9-L10

Move mouse is working nicely!

But the KeyPress is not that a simple mortal can expect. :-p
You know a reliable node module to translate chars to keycodes?
All that i know is to list xmodmap -pke.

Thanks @sidorares, i get some time to understand but works nice.
I also did the pull request #112 allowing us to recognize AltGr key.