How do you send keyboard input to a program?
That is, under a Linux GUI, is there a good manual (programmable) way, or tool, of simulating keyboard input on a running program on Linux, so that I can send from the command-line, e.g., "Control-T" to a Firefox process and "echo 'hello'\n" to a Gnome-Terminal process without actually focusing on each of those processes and typing in directly?
xdotool
does have a way of sending keystrokes if limited to a focused window:
WID=`xdotool search "Mozilla Firefox" | head -1`
xdotool windowactivate $WID
xdotool key ctrl+l