I am using windows on my laptop. I also remapped caps lock to esc for smoother vim experience.
Now my caps lock light indicator is always off and I start wondering "Is it possible to use caps lock indicator for something else?". Something like blinking on request etc.
I never did something like that so I have very basic questions:
Can light indicator be separately turned on\off without actual caps lock functionality?
Unless your keyboard has its own API to control the lights (gaming keyboards sometimes do), or you have a custom keyboard driver that can control the lights, then what you are asking for is generally not possible with most keyboards, as Windows simply has no API to control just a keyboard's lights without also updating its key states.UPDATE:
Apparently, there is such an API, after all:
IOCTL_KEYBOARD_QUERY_INDICATORSIOCTLIOCTL_KEYBOARD_SET_INDICATORSIOCTLYou can use
DefineDosDevice()andCreateFile()to open aHANDLEto the desired keyboard, and then useDeviceIoControl()to query the keyboard for its currentKEYBOARD_INDICATOR_PARAMETERS, and then update itsLedFlagsfield to include or omit theKEYBOARD_CAPS_LOCK_ONflag to turn the CapLock key's LED light on/off as needed.See Manipulating the Keyboard Lights in Windows NT for an example.