Keyboard and mouse input from Python