Keyboard Macro's with xvkbd

You can use xvkbd to run keyboard macro's. For example, the following command.

sleep 3; xvkbd -text "Hello\[Enter]World"

This will wait 3 seconds then type “Hello” then press the [Enter] key, then type “World”.

Macro Trick

To make a temporary macro that you can execute with a keystroke, you might create a file called “macro.tmp” in your home directory.

Now, assign the following command to a keystroke in your environment.

xvkbd -text "`cat ~/macro.tmp`"

Now, to create a macro, just edit the macro.tmp file. To launch it, just press the key combination you've assigned to the command above. Poof, instant macro.

Related Products

LOG9675610403
comments powered by Disqus
linux/keyboard_macro_s_with_xvkbd.txt · Last modified: 2020/06/01 22:53 (external edit)