tags:

views:

26

answers:

1

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.

+1  A: 

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 XkbGetIndicatorState to read the indicators from your keyboard.

Pablo Alejandro Costesich