{"identifier":38567,"topic":"Commands","name":"functionKey","text":"<code>functionKey <i>posInteger<\/i><\/code> <br><br>\n\n Note: <code> <i>posInteger<\/i> <\/code>must yield a number between 1 and 15. <br><br>\n\n HyperCard sends the<code> functionKey <\/code>command to the current card when the user presses one of the function keys on the Apple Extended Keyboard. <br><br>\n\n The<code> functionKey <\/code>command performs an undo, cut, copy, or paste for the values 1 through 4. Integer values 5 through 15 have no built-in effect. <br>\n<br>\nYou can handle the<code> functionKey <\/code>message as follows: <br><br>\n\n <code><pre>on functionKey whichKey\n   <i>statements<\/i>\nend functionKey<\/pre><\/code> <br>\n","related":{"3428":"Commands sent automatically","6031":"Where messages are sent initially"},"examples":"functionKey 1 -- performs undo\nfunctionKey 2 -- performs cut\nfunctionKey 3 -- performs copy\nfunctionKey 4 -- performs paste\n\n  \n-- An example handler:\n\non functionKey whichKey  \n  if whichKey is 5 then myCoolHandler\n  else if whichKey is 6 then choose browse tool \n  else if whichKey is 7 then choose button tool\n  else if whichKey is 8 then choose field tool\n  else pass functionKey\nend functionKey","demo":"","debug":{"9":["functionKey posInteg"],"10":["You can handle the f"]}}