This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision | ||
linux:keyboard_macro_s_with_xvkbd [2008/11/20 15:22] 127.0.0.1 external edit |
linux:keyboard_macro_s_with_xvkbd [2020/06/01 22:53] (current) |
||
---|---|---|---|
Line 1: | Line 1: | ||
+ | ====== 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 | |