HP Forums
Control Keyboard LEDs? SOLVED! - Printable Version

+- HP Forums (https://www.hpmuseum.org/forum)
+-- Forum: HP Calculators (and very old HP Computers) (/forum-3.html)
+--- Forum: HP Prime (/forum-5.html)
+--- Thread: Control Keyboard LEDs? SOLVED! (/thread-20650.html)



Control Keyboard LEDs? SOLVED! - toml_12953 - 10-15-2023 09:44 AM

What values can I send to a USB keyboard to turn on the LEDs?
My keyboard reading program is coming along but I'd like the LEDs to reflect the state of the Caps Lock, Num Lock, and Scroll Lock keys.

Thanks for any info!

I found the codes. It's very simple.

Use USBSend({n})

where n is:

1 - Num Lock
2 - Caps Lock
4 - Scroll Lock

You can combine them to turn on or off combinations

USBSend({5}) - Turns off Caps Lock and turns on Num Lock and Scroll Lock

USBSend({0}) - Turns off all LEDs

USB Send({3}) - Turns off Scroll Lock and turns on Num Lock and Caps Lock

You should get the idea.