i am trying to have the F7 key pressed twice, thrice etc, if Pin 20 goes low. What is the best way to go about this? I have tried to just copy the Keyboard.press() part to repeat it, but that doesn't work.

F7 is used for Volume down in an application and 1 step at a time is too low of a resolution for a range of 100.

if (digitalRead(20) == LOW)
else{ Keyboard.release(KEY_F7);}