Convert a toggle switch into a momentary response
You could use a schmitt trigger EXOR gate like this: -



Every time the input waveform changes state you get a positive pulse at the output and the duration of that pulse is determined by the RC time constant.