How exactly does one find out the status of the lock keys on Linux (2.6.x), using C?
(I have a crappy keyboard without LED’s for this stuff, and I need to write an X11 app to do this)
If such an app exists (and is DE agnostic – I run e16), I’d also like to hear it as well.
You can use the led addon to gkrellm. If you want to develop your own app, you can always look a the gkrellm-led sources (Ubuntu). And, of course, you can always go with xkbvleds (source).
Anyway, you can always use
XkbGetIndicatorStateto read the indicators from your keyboard.