How to create a fake device file that accepts input from a C program?

view full story

http://unix.stackexchange.com – I want to create a C program that accepts input from a joypad (/dev/input/js0), processes it, and then sends it to a fake device file (character or block) labeled as a keyboard (oh, and what is the device file for a keyboard?. I would like to know if it is possible to do this, and if so, how. (HowTos)