cancel
Showing results for 
Search instead for 
Did you mean: 

Is there a way to read the state of the computer? (HID Keyboard)

JMOON.1
Associate II

I'm using 'STM32F103RCT' and been create a HID Custom keyboard.

I want to know the states of 'Num Lock', 'Insert' and 'Caps Lock' etc on the HID keyboard's computer.

Because it has to be checked with LED.

lighting the LED is essential when connecting to the computer.

How do I know the state of the computer?

Reading the computer's state is the difficult problem.

1 ACCEPTED SOLUTION

Accepted Solutions
Pavel A.
Evangelist III

A keyboard does not "read" the host's (computer) Num lock etc. states.

Rather, the computer requests the keyboard to set its LEDs on/off.

The keyboard should advertise the LEDs capability in its HID report descriptor and should handle the host's requests properly.

-- pa

View solution in original post

1 REPLY 1
Pavel A.
Evangelist III

A keyboard does not "read" the host's (computer) Num lock etc. states.

Rather, the computer requests the keyboard to set its LEDs on/off.

The keyboard should advertise the LEDs capability in its HID report descriptor and should handle the host's requests properly.

-- pa