Function key


A function key is a key on a computer or terminal keyboard that can be programmed to cause the operating system or an application program to perform certain actions, a form of soft key. On some keyboards/computers, function keys may have default actions, accessible on power-on.
Image:Qwerty.svg|thumb|right|500px|A 104-key US English keyboard layout with the function keys in orange
Function keys on a terminal may either generate short fixed sequences of characters, often beginning with the escape character, 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. Function keys may have abbreviations or pictographic representations of default actions printed on/besides them, or they may have the more common "F-number" designations.

History

The Singer/Friden 2201 Flexowriter Programmatic, introduced in 1965, had a cluster of 13 function keys, labeled F1 to F13 to the right of the main keyboard. Although the Flexowriter could be used as a computer terminal, this electromechanical typewriter was primarily intended as a stand-alone word processing system. The interpretation of the function keys was determined by the programming of a plugboard inside the back of the machine.
Soft keys date to avionics multi-function displays of military planes of the late 1960s/early 1970s, such as the Mark II avionics of the F-111D. In computing use, they were found on the HP 9810A calculator and later models of the HP 9800 series, which featured 10 programmable keys in 5×2 block at the top left of the keyboard, with paper labels. The HP 9830A was an early desktop computer, and one of the earliest specifically computing uses. HP continued its use of function keys in the HP 2640, which used screen-labeled function keys, placing the keys close to the screen, where labels could be displayed for their function.
NEC's PC-8001, introduced in 1979, featured five function keys at the top of the keyboard, along with a numeric keypad on the right-hand side of the keyboard.
Their modern use may have been popularized by IBM keyboards: first the IBM 3270 terminals, then the IBM PC. IBM use of function keys dates to the IBM 3270 line of terminals, specifically the IBM 3277 with 78-key typewriter keyboard or operator console keyboard version, which both featured 12 programmed function keys in a 3×4 matrix at the right of the keyboard. Later models replaced this with a numeric keypad, and moved the function keys to 24 keys at the top of the keyboard. The original IBM PC keyboard had 10 function keys in a 2×5 matrix at the left of the keyboard; this was replaced by 12 keys in 3 blocks of 4 at the top of the keyboard in the Model M.

Schemes on various keyboards

  • Mac: The classic Mac OS supported system extensions known generally as FKEYS which could be installed in the System file and could be accessed with a Command-Shift- keystroke combination ; however, early Macintosh keyboards did not support numbered function keys in the normal sense. Since the introduction of the Apple Extended Keyboard with the Macintosh II, however, keyboards with function keys have been available, though they did not become standard until the mid-1990s. They have not traditionally been a major part of the Mac user interface, however, and are generally only used on cross-platform programs. According to the Macintosh Human Interface Guidelines, they are reserved for customization by the user. Current Mac keyboards include specialized function keys for controlling sound volume. The most recent Mac keyboards include 19 function keys, but keys F1–F4 and F7–F12 by default control features such as volume, media control, and Exposé. Former keyboards and Apple Keyboard with numeric keypad have the F1–F19 keys.
  • Mac laptops: Function keys were not standard on Apple notebook hardware until the introduction of the PowerBook 5300 and the PowerBook 190. For the most part, Mac laptops have keys F1 through F12, with pre-defined actions for some, including controlling sound volume and screen brightness.
  • Apricot PC/Xi: six unlabelled keys, each with an LED beside it which illuminates when the key can be used; above the keys is a liquid crystal display—the 'microscreen'—that is used by programs to display the action performed by the key.
  • Atari 8-bit computers: four dedicated keys at the right hand side or on the top of the keyboard; the XL models also had a Help key. Atari 1200XL has four additional keys labeled F1 through F4 with pre-defined actions, mainly related to cursor movement.
  • Atari ST: ten parallelogram-shaped keys in a horizontal row across the top of the keyboard, inset into the keyboard frame instead of popping up like normal keys.
  • BBC Micro: red/orange keys F0 to F9 in a horizontal row above the number keys on top of the computer/keyboard. The break, arrow, and copy keys could function as F10–F15. The case included a transparent plastic strip above them to hold a function key reference card.
  • Coleco Adam: six dark brown keys in a horizontal row above the number keys, labeled with Roman numerals I–VI.
  • VIC-20 and Commodore 64: F1/F2 to F7/F8 in a vertical row of four keys descending on the computer/keyboard's right hand side, odd-numbered functions accessed unshifted, even-numbered shifted; orange, beige/brown, or grey key color, depending on VIC/64 model/revision.
  • Commodore 128: essentially same as VIC-20/C64, but with function keys placed in a horizontal row above the numeric keypad right of the main QWERTY-keyboard; also had Help key.
  • Commodore Amiga: ten keys arranged in a row of two five-key groups across the top of the keyboard ; function keys are 1½ times the width of ordinary keys. Like the Commodore 128, this also had a Help key.
  • Graphing calculators, particularly those from Texas Instruments, Hewlett-Packard and Casio, usually include a row of function keys with various preassigned functions. On low-end models such as the TI-83-series, these function mainly as an extension of the main keyboard, but on high-end calculators the functions change with the mode, sometimes acting as menu navigation keys as well.
  • HP 2640 series terminals : first known instance—late 1970s—of screen-labeled function keys.
  • HP 9830: F1–F8 on two rows of four in upper left with paper template label. An early use of function keys.
  • IBM 3270: probably the origin of function keys on keyboards, circa 1972. On this mainframe keyboard early models had 12 function keys in a 3×4 matrix at the right of the keyboard; later that changed to a numeric keypad, and the function keys moved to the top of the keyboard, and increased to 24 keys in two rows.
  • IBM 5250: early models frequently had a "cmd" modifier key, by which the numeric row keys emulate function keys; later models have either 12 function keys in groups of 4, or 24 in two rows. These keys, along with "Enter", "Help", and several others, generate "AID codes", informing the host computer that user-entered data is ready to be read.
  • IBM PC AT and PS/2 keyboard: F1 to F12 usually in three 4-key groups across the top of the keyboard. The original IBM PC and PC XT keyboards had function keys F1 through F10, in two adjacent vertical columns on the left hand side; F1|F2, F3|F4,..., F9|F10, descending. Some IBM compatible keyboards, e.g., the Northgate OmniKey/102, also featured function keys on the left, which on examples with swapped left Alt and Caps Lock keys, facilitate fingers of a single hand simultaneously striking modifier key and function keys swiftly and comfortably by touch even by those with small hands. Many modern PC keyboards also include specialized keys for multimedia and operating system functions.
  • MCK-142 Pro: two sets of function keys: F1–F12 at the left side of the keyboard and additionally 24 user programmable PF keys located above QWERTY keys.
  • NEC PC-8000 Series : five function keys at the top of the keyboard, along with a numeric keypad on the right-hand side of the keyboard.
  • Sharp MZ-700: blue keys F1 to F5 in a horizontal row across the top left side of the keyboard, the keys are vertically half the size of ordinary keys and twice the width; there is also a dedicated "slot" for changeable key legend overlays above the function key row.
  • VT100 terminals: four function keys above the numeric keypad.

    Action on various programs and operating systems

Mac OS

In the classic Mac OS, the function keys could be configured by the user, with the Function Keys control panel, to start a program or run an AppleScript.
macOS assigns default functionality to all the function keys from to, but the actions assigned by default to these function keys have changed a couple of times over the history of Mac products and corresponding Mac OS X versions. As a consequence, the labels on Macintosh keyboards have changed over time to reflect the newer mappings of later Mac OS X versions: for instance, on a 2006 MacBook Pro, functions keys, and are labelled for volume down/volume up, whereas on later MacBook Pros, the volume controls are located on function keys to where they are mapped to various functions.
Any recent version of macOS is able to detect which generation of Apple keyboard is being used, and to assign proper default actions corresponding to the labels shown on this Apple keyboard. As a result, default mappings are sometimes wrong when using a recent USB Apple keyboard on an older version of Mac OS X, which doesn't know about the new function key mapping of this keyboard.
It can be noted that:
  • all function keys have been changed over time, with the exception of and, which have always been mapped to brightness control.
  • all Mac laptops after 2007 are missing any Num Lock key, even if they lack a keypad.
  • the special key for ejection of disks were removed from Apple computers since they lack an internal optical disk drive, with the exception of the 2010 MacBook Air, which had disk ejection labelled on its key.
  • function keys to have no labels, and are only available on full keyboards with numpads.
  • function key is mapped to show desktop and function keys and are mapped by default to decrease/increase contrast.
  • on Boot Camp, function keys to are mapped to the corresponding IBM PC keys : Print Screen, Scroll Lock and Pause key
  • on all versions of macOS, software functions can be used by holding down the Fn key while pressing the appropriate function key, and this scheme can be reversed by changing the macOS system preferences.
  • some MacBook Pro models from 2016 to 2022 replaced the physical function keys with the Touch Bar.