Using a ps3 controller for the PC version of Lego Star Wars: The Complete Saga
XPadder is a software program that acts as a layer translating the controller buttons to actual keyboard keymaps.
http://xpadder.com/
Similar thread: Can I use a game controller to play Diablo 3?