A function key is a part of the keyboard. It is abbreviated with F key. The C64 has 8 function keys to , which are integrated on 4 keys. On other computer systems there are more than 8 function keys, e.g. on a PC there are 12 function keys.
The C16/116 and Plus/4 have a different function key combination. The keys to and are directly pushed. For the keys to they same keys must be combined with the key . This function keys are mapped by the OS.
Function keys can also be mapped by the user. On C128, C16/116 and Plus/4 this is easily done with the BASIC command KEY. Also cartridges and BASIC expansions use the function keys for calling up routines or commands for better user comfort. Some of them expand them to up to 16 function keys. These expanded function keys ( or higher) are often available in combination with the keys or .
Programming[edit | edit source]
A short BASIC program for using the function keys:
10 B$ = "YOU PUSH: " 20 GET A$: IF A$="" THEN 20 30 IF A$=CHR$(133) THEN PRINT B$"F1" 31 IF A$=CHR$(134) THEN PRINT B$"F3" 32 IF A$=CHR$(135) THEN PRINT B$"F5" 33 IF A$=CHR$(136) THEN PRINT B$"F7" 34 IF A$=CHR$(137) THEN PRINT B$"F2" 35 IF A$=CHR$(138) THEN PRINT B$"F4" 36 IF A$=CHR$(139) THEN PRINT B$"F6" 37 IF A$=CHR$(140) THEN PRINT B$"F8" 38 IF A$="X" THEN END 40 GOTO 20
The program is aborted by pushing the key.