Swinput can fake a mouse and a keyboard by using the Linux Input System. The swinput modules read from a device and fakes hardware event (mouse motion, key presses etc) as commands written on the devices. Swinput presents status etc on the proc filesystem.