Hi.
The easiest way is to place a Boolean control on the front panel, in an area where the user does not see it while the VI is running.
Right click on the control, go the Advanced >> Key Navigation, and assign the F1 key to that control. This way, when the user presses F1, he will be changing the value of this control, but since you don't have it connected to anything in the block diagram, the VI won't do anything.
Alejandro