How can I map my Logitech gamepad to the keyboard?

view story

http://askubuntu.com – I recently downloaded Steam and bought the HL1 bundle, as well as a few other games through Steam and Desura. I would like to use my Logitech F310 instead of the keyboard and mouse, but I can't seem to find any application to map those keys to buttons on my gamepad. Can anyone help out? (HowTos)