in reply to capturing all IO of a process

Hmmm. You don't want it to store to a local file and you 'especially' want keyboard input? What are you trying to build, a password sniffer?

Celebrate Intellectual Diversity