ydotool icon indicating copy to clipboard operation
ydotool copied to clipboard

How can I increase speed of the type function?

Open distbit0 opened this issue 1 year ago • 3 comments

Hi this is a super useful library. Thanks for writing it. I have noticed though that the type function is quite slow compared to some other x11-only keyboard input tools, and was wondering if there is any way to make it much faster so that the time it takes to type out text is imperceptible? I have set --next-delay to 0 but it doesn't seem to have helped very much.

The time I am referring to is the time between each "click"/letter.

I am running fedora 39 wayland.

Many thx!

distbit0 avatar Feb 08 '24 12:02 distbit0

I also wondered if there is a way to speed up typing. The -d flag helps some. But its still quite a bit slower than wtype.

λ › time ./ydotool type "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" 
ydotool type   0.00s user 0.00s system 0% cpu 2.160 total
λ › time ./ydotool type -d0  "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"                                                                                                  
ydotool type -d0   0.00s user 0.00s system 0% cpu 1.093 total
λ › time wtype type "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
wtype type   0.00s user 0.00s system 1% cpu 0.280 total

fictitiousexistence avatar Mar 27 '24 14:03 fictitiousexistence

I switched from xdotool to ydotool and yeah, the default speed, which is supposed to be 12ms, feels slower than 12ms. Even setting it to -d 1 doesn't feel like it's 1ms delay between button press.

Garuda Linux (Arch)

RudraPS97 avatar May 06 '24 07:05 RudraPS97

I'm now using https://sr.ht/~geb/dotool/ which is faster and works on wayland

Some others which I haven't tried https://gist.github.com/probonopd/9feb7c20257af5dd915e3a9f2d1f2277 https://git.sr.ht/~brocellous/wlrctl https://github.com/adrienverge/gnome-magic-window https://github.com/atx/wtype https://github.com/franziskuskiefer/app-keys-gnome-shell-extension https://github.com/ickyicky/window-calls

distbit0 avatar May 06 '24 07:05 distbit0