I'd like to show the state of xkb on status bar of (preferably any) window manager. State should include LED-indicators (both physical and virtual), modifier state, and both keycode and keysym each time some key is pressed.
I've looked at xkbvleds with an intention to retrieve LED-state, but as far as I can see, it does not return any parsable information; just a new window with pre-defined appearance. I don't see a way to use it in the way I want to.
I've looked at xev with an intention to retrieve the keycodes and keysyms of pressed keys, but it works only if focus is on specified window. I'd like to monitor keypresses globally, letting them through unmodified.
Finally, I've looked at xinput, and it seems to me that I might be able to retrieve keypresses with that. It just looks a rather painful way to achieve what I want (if it would even work).
This does not seem that exotic need in my eyes, which makes me think that I'm looking it in a wrong way, and/or missing something more or less obvious.
Personally I'm looking for window manager -independent solutions here.
It seems to me that they both are keyboard layout switchers and/or indicators, and don't do any keyboard event monitoring. I'd like to see e.g. text "Caps" if I have caps lock on, or "Control bracketleft" if I press C-[. And that should be shown on status bar.
– montiainen Sep 20 '15 at 16:35