A lock key is a key on a keyboard which typically toggles the behaviour of multiple keys.
When the key is pressed, the selected lock mode is engaged, and the affected keys will exhibit different behaviour. Pressing the lock key a second time will disengage the lock state. Scroll lock is an example of a lock state that does not affect the behaviour of the keyboard.
See: List of lock keys
Each lock state typically has an associated LED on the keyboard. Early IBM PC keyboards lacked these LEDs; support for two-way communication with LED control was introduced with the AT keyboard interface, and IBM AT keyboards featured a bank of LEDs at the top right. Model M and Model F keyboards without status LEDs are the older models that use the XT keyboard interface.
The number of lock keys varies by keyboard. Numeric keypads may feature a single num lock LED; comparatively, tenkeyless keyboards will lack the num lock LED, just as they lack the numeric keypad. Some keyboards such as the Chicony KB-5591 have extra lock LEDs, for example cursor lock. Typical PC keyboards feature num lock, caps lock, and scroll lock LEDs at the top right in that specific order; the status LED order has never changed in over twenty-five years.
On some keyboards, the status LEDs are integrated directly into the keys. The LED will be integrated into the switch or placed directly under or beside the switch, and the keycap will have a window to let the light through.
Several Cherry switch families including Cherry MX and Cherry M8 support integrated LEDs. Matias switches have transparent shells to permit light to shine through from an LED under the switch, as the Alps switch design does not have space to support an LED without removing the click leaf; Alps SKCL/SKCM and SKBL/SKBM switches and clone families do support integrated LEDs, and these switches are always linear.
Alternate action switches
Alternate action switches cycle between open and closed each time they are pressed. Typically, the slider latches in a lower position when the switch is closed, and returns to its fully raised position when the switch is pressed again.
Alternate action provides both a tactile and visual alternative to status LEDs: the lock state can be felt based on the key position (raised or lowered) and this state can also be observed by the operator. Illuminated alternate action switches do exist, but in keyboards they are typically not fitted with an LED.
Apple were one of the most prominent companies to alternate action switches, even with the membrane-based Apple Keyboard II. Cherry manufactured the MX Lock alternate action switch, but these are seldom found in Cherry MX keyboards.