You should use the SendKeys. It simulates the keyboard presses.
The only problem is, how will you get information if F1 key is pressed. If your aplication is not focused that could not work. You should try, I'm not sure about this.