Keyboard Shortcut To Send Text Strings To Program
One simple approach is xdotool
, like
xdotool type 'text'
The xdotool works. However if you integrate it with the keyboard shortcut .. a simple xdotool type 'text' fails.
THe following shell script helped me in that
windowid=$(xdotool getwindowfocus)
sleep 0.5 && xdotool windowactivate --sync $windowid type 'text'
You may use AutoKey. Here is the description from the web site. “AutoKey is a desktop automation utility for Linux and X11. It allows you to manage collection of scripts and phrases, and assign abbreviations and hotkeys to these. This allows you to execute a script or insert text on demand in whatever program you are using.”
It is packaged, as far as I can tell, for Gentoo (announced here); for Ubuntu (here); Debian (here)...