new123456
new123456

Reputation: 873

Linux C - Get Lock Keys Status'

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.

Upvotes: 2

Views: 592

Answers (1)

Pablo A. Costesich
Pablo A. Costesich

Reputation: 738

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.

Upvotes: 3

Related Questions