We are running Yocto Linux for an embedded application. I'm looking for a way to programatically control the Caps Lock state either through bash prompt or code, either set the state or read the state so that the state is known, without using X-Windows. We do not have X-Windows libraries installed and we cannot add them at this time. All the solutions that we've found searching require an X-Windows library or use of an X tool, such as xmodmap. Any help would be greatly appreciated. This seems like such a simple thing to require bringing in X-Windows into our embedded device for. Isn't there a sysfs entry we can just read?
This question is similar to How can I turn on/off Caps Lock, Scroll Lock, Num Lock key programatically on Linux, but I'm looking for a solution without requiring X-Window Libraries or utilities.