Increase PWM frequency when switch button is pressed

I want to increase the frequency of PWM whenever switch button is pressed. How to do that? Please tell me

no idea..

well.... how fast is the pwm WITHOUT pressing the button? :fearful: