Na " definição de classe de dispositivo para interface humana Devices (HID) "versão 11.1 " especificação:
Synchronization between LED states and CAPS LOCK, NUM LOCK, SCROLL LOCK, COMPOSE, and KANA events is maintained by the host and NOT the keyboard. If using the keyboard descriptor in Appendix B, LED states are set by sending a 5-bit absolute report to the keyboard via a Set_Report(Output) request.
Para alterar os LEDs do teclado, o teclado aceita um comando para isso. Portanto, não é um dispositivo "apenas de entrada" (significando que apenas envia dados para o host).
Dito isto, há um processo de negociação e enumeração com todos os dispositivos USB que exigem uma conversa de retorno entre o host e o dispositivo. Você não pode ter um dispositivo USB "somente leitura".
Mesmo antes do USB, o controlador de teclado do PC aceitava comandos porque fazia algumas coisas além de ler o teclado ( reference <) / a>):
If a keyboard is a separate peripheral system unit (such as in most modern desktop computers), the keyboard controller is not directly attached to the keys, but receives scancodes from a microcontroller embedded in the keyboard via some kind of serial interface. In this case, the controller usually also controls the keyboard's LEDs by sending data back to keyboard through the wire.
The IBM PC AT used an Intel 8042 chip to interface to the keyboard. This computer also controlled access to the A20 line in order to implement a workaround for a chip bug in the Intel 80286.1 The keyboard controller was also used to initiate a software CPU reset in order to allow the CPU to transition from protected mode to real mode1 because the 286 did not allow the CPU to go from protected mode to real mode unless the CPU is reset. This was a problem because the BIOS and the operating system services could only be called by programs in real mode.
These behaviors have been used by plenty of software that expects this behavior, and therefore keyboard controllers have continued controlling the A20 line and performing software CPU resets even when the need for a reset via the keyboard controller was obviated by the Intel 80386's ability to switch to real mode from protected mode without a CPU reset.