The proCONTROLL library allows Processing to communicate with controll devices like joysticks, joypads but also keyboards and mice.