What does HackerNews think of xdotool?

fake keyboard/mouse input, window management, and more

Language: C

I often create screen recordings for my classes, but it's very boring and time consuming. I'm a perfectionist, and if I mistype a command I prefer to re-record everything. Moreover, every time one of the tools used in the videos gets a significant update, I feel compelled to redo the video.

I have started using xdotool [1] to create bash scripts that send mouse clicks and keystrokes to apps. Interleaving calls to xdotool with the "sleep" command [2] produce a convincing effect. If I need to redo a video to fix typos or after a program update, I just fix the bash script and restart the recording.

Alas, the only thing that is missing in my videos is the sound of keyboard clicks… But nothing is perfect!

[1] https://github.com/jordansissel/xdotool

[2] https://en.wikipedia.org/wiki/Sleep_(command)

> I shouldn't need to download an app to a smartphone for something that I exclusively intend to use on a desktop.

I see where you're coming from here and mostly agree. However, I will say that as someone who already had the Cash App installed the process was pretty seamless. The only major item I would change is that it would be nice to have some way to import a CSV or XLS file (or even JSON) for the capital gains forms. They offer an online spreadsheet but you still have to fill out each cell individually. If you have a few dozen trades (or more) to report it gets rather tiresome and could even be a bit error-prone.

I suppose I could have scripted the data entry with keyboard macros (via xdotool[0]), but for something I only do once per year it probably wouldn't be worthwhile… and the interface could be different next year.

[0] https://github.com/jordansissel/xdotool

Espanso currently supports X11-based linux systems through the X Record Extension [1] and libxdo [2]

That said, I'm currently working on another engine based on evdev that could be able to support also Wayland systems.

For the linux install see also: https://espanso.org/install/linux/

[1]: https://www.x.org/releases/X11R7.6/doc/libXtst/recordlib.htm... [2]: https://github.com/jordansissel/xdotool