I have attached a diff file which will implement this feature in the input-sdl
plugin using the hard coded keys right-shift/control. It's pretty easy.
Doing this using joystick buttons which are configurable is a more involved
task, which would require adding new configuration parameters and dealing with
the whole auto-configuration system.
There's not really that much code in the input-sdl plugin, you should be able
to just read through it and figure it out.
Richard