Ah ok.
I play with a controller and I was playing Resident Evil 4 the other day. The quick time sections where you have to rapidly push a button to escape a scene gave my thumb spasms and I am just a little too slow so kept dying.
I have arthritis so having rapid fire on my controller would make things a bit easier for me.
Guess I will have to look for a controller that has these functions build in and hope I get a nice enough one.
You may want to look in to the Logitech F310 or F710 controllers. There is Logitech software you can download for it that allows you to change settings but I'm not sure it will let you toggle a button press.
I do exactly what you are looking to do with a Logitech keyboard and mouse. I use their software to hotkey button key spamming or mouse clicks if a game is going to give me carpal tunnel or just out of sheer laziness.