Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

Is there a tool that pastes from clipboard one character at a time? Something that would simulate a real person typing, like in the movies ;)

Of course I am referring to X applications, preferably KDE, but others will do also.

UPDATE - I need to type to GUI applications, not the terminal.

share|improve this question

3 Answers 3

xsel | sed 's/./usleep 200000,str &,/g' | xargs -d, xte

"xte" is part of xautomation. xclip is another alternative to xsel.

That would work for letters, but probably not many others as that generates key events based on strings.

share|improve this answer
    
This is almost working ... except TAB and new-line characters. I also tried something like this xsel | pv -q -L 20 | xargs -n1 -I{} xte "str {}" –  Patkos Csaba Sep 1 '12 at 10:33

You could try a keyboard macro utility like autokey. It's scriptable in python so has access to the X clipboard.

share|improve this answer

The following works for me including tabs and new lines:

xclip -o -sel c | while read -N 1; do sleep 0.18 && xdotool type --clearmodifiers "$REPLY"; done

Clipboard content used for testing (I'm using a US keyboard with en-US layout):

abdcdefghijklmnopqrstuvwxyz
ABCDEFGHIJKLMNOPQRSTUVWXYZ
~`!@#$%^&*()_+=-    1234567890
<>,.?/:;    "'{}[]\|
share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.