I don't think that the GuiTest will help me here. Basically I have a function that calls a getch that uninitiates the current process. That's what I am trying to achieve in perl ( simulate the keystroke ). When running the script in Windows it all goes well. I assume that when running it using ssh from ,let's say, ubuntu it fails to simulate the keystroke because ssh is not interactive.