http://en.lfsmanual.net/wiki/Script_Guide
Automatic shifter configuration (for Logitech G25 users)
Shortcut keys used: None
To automatically adjust the controller bindings for the shift mechanism used by the currently selected car, all you have to do is modify the existing road.lfs, sequential.lfs and paddle.lfs as shown below.
Optionally you can also add re-bindings of whatever you want to use the free shifter/paddle buttons for. For example, when using the shifter unit, my right paddle acts as handbrake and the left one as horn, whereas when using the paddles, pulling the sequential stick is the handbrake and pushing sounds the horn. Doing this maximises the capabilities of the few easy-to-reach buttons on the G25; these re-bindings are not included in the example scripts.
road.lfs
/button 8 gear_1
/button 9 gear_2
/button 10 gear_3
/button 11 gear_4
/button 12 gear_5
/button 13 gear_6
/button 14 reverse
/shifter shifter
/autoclutch 0
/echo Shiftmode: H-Gate
sequential.lfs
/button 9 shift_up
/button 8 shift_down
/shifter sequential
/autoclutch 0
/echo Shiftmode: Sequential
paddle.lfs
/button 4 shift_up
/button 5 shift_down
/shifter sequential
/autoclutch 1
/echo Shiftmode: Paddles
Sorry for epic post.