Read state of caps lock from keyboard
keyboard-pc-usb-stm32
Is it possible to read state of capslock on/off with stm?
Using HAL and cubemx HID configuration.
I can send report. But how to receive report - status?
keyboard-pc-usb-stm32
Is it possible to read state of capslock on/off with stm?
Using HAL and cubemx HID configuration.
I can send report. But how to receive report - status?
> Is it possible to read state of capslock on/off with stm
No, but this is regardless of whether "with stm" or without. The USB keyboard is completely state-less - it reports which keys are currently pressed, and CAPS LOCK is not different from any other ordinary key. It's the host which has to maintain the CAPS-toggle state, if it implements that at all.
Similarly for LEDs - there is no way to read out the state of LEDs from the keyboard (it even may not implement the LEDs at all). This is even explicitly stated in the standard (HID1.11) in Appendix C:
Synchronization between LED states and CAPS LOCK , NUM L OCK , SCROLL L OCK ,
COMPOSE , and KANA events is maintained by the host and NOT the keyboard
Read the respective USB HID standard documents.
JW
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.