Assuming you're on Linux, you can just pipe the input into "xargs xdotool type". Thanks to the keyboard abstraction in X, no program will ever be able to tell that you didn't just type that on a keyboard.
(Though I'm not defending the X keyboard API. Linux input is a nightmare. I especially like the hard-coded list of keys in the kernel, limiting the number of unique keys that any userspace application can address, even though it's perfectly possible to plug in 128 keyboards each with several hundred keys.)
http://code.google.com/p/semicomplete/issues/detail?id=13