Filtering the keyboard input

view full story

http://unix.stackexchange.com – I have a program that takes input from the keyboard and presents a nice visualization. The purpose of the program is so that my infant can mash on the keyboard and get the computer to do something. However, I would like to write a keyboard input sanitizer that is disjoint from the main program. Conceptually, I would want the program have the functionality: sanitize_keyboard_input | my_program Where my_program thinks it is getting input from the keyboard but it is really getting input from sanitize_keyboard_input. Is there a way to do this? I am running Ubuntu linux if that helps. (HowTos)