Binding autofire to a key

Is it possible to bind retroarch’s autofire option to a keypress? The main emulator I was looking at that for is the Turbographx 16 emulator since its original controller has that feature built in and some games (shooters mainly) are kind of designed around it; autofire for normal attack, hold to charge.