Enjoy is a utility that lets USB joysticks and gamepads work with programs that normally expect keyboard input. Each gamepad button can be set to simulate a particular key. For example, the "Fire" button can be set to spacebar, and in any game where the spacebar is used to shoot, the "fire" button can be used instead.

via Enjoy.