Other way of to do this is through of the ON KEY LABEL command. Eg.:
* In Init event of the form, put this:ONKEYLABEL F2 ThisForm.cmdDoAnyThing1.Click()
ONKEYLABEL F3 ThisForm.cmdDoAnyThing2.Click()
* In Unload event of the form, put this for clear:ONKEYLABEL F2
ONKEYLABEL F3