How do I send keystrokes to a window. Also, how do I focus the window that I would like to send keystrokes to? I believe its gonna involve writing to a pipe but I can't find any info on it anywhere. I am fluent with C++, Perl, but I have no idea how to do it in Linux. Doing it in windows was easy to figure out, there are several ways. Whats the easiest way to do this? I am trying to automate a gui program.