A light-emitting diode or LED is a form of diode that emits light. In relation to keyboards, LEDs are used to provide backlighting and for lock LEDs. LEDs are also used in mice and trackballs both in opto-mechanical sensing (using infrared LEDs) and in pure optical sensing (typically visible spectrum LEDs).
LED fitted to a Cherry MX switch
Windowed lock LED key on a Cherry G80-9013
Bare LEDs on a Cherry G84-4400 controller board
LEDs and corresponding plate holes in a Tulip ATK 030244
LEDs in a Burroughs Opto-Electric keyboard; these form part of the switching mechanism
Red LEDs in an Acorn BBC Microcomputer keyboard
Xiang Min KSB-LE switch with LED illuminated