A function key is a key on a computer or terminal keyboard which can be programmed so as to cause an application program to perform certain actions.

Function keys on a terminal may either generate short fixed sequences of characters, often beginning with the escape character (ASCII 27), or the characters they generate may be configured by sending special character sequences to the terminal.

On a standard computer keyboard, the function keys may generate a fixed, single byte code, outside the normal ASCII range, which is translated into some other configurable sequence by the keyboard device driver or interpreted directly by the application program.

On most IBM PC keyboards, the function keys are F1 to F12 in the superior row. PC/XT and AT keyboards only have function keys F1 through F8.