Possible to read state of capslock key using KeyboardBT? #2331
-
I'm porting a project from the mbed os core for rp2040 to the arduino-pico core since it has a bluetooth keyboard library and I'm wondering if it is possible to see if the capslock key is activated or disabled on the connected bluetooth device. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
Ooops, mybad. I completely zoned out and forgot we already support it. The |
Beta Was this translation helpful? Give feedback.
Ooops, mybad. I completely zoned out and forgot we already support it. The
onLED
callback works in USB and in Bluetooth mode. See the KeyboardBT example. You can't "read" the state, but you get a callback whenever the state changes, so just keep track of it there. In the example it sets the Pico's LED on or off for CAPSLOCK.