I have a remote connection through NX client (Remmina) from my local box (Ubuntu 12.04) onto a remote Linux box (CentOS 5.3) with no root privilege, and it only has a strictly restricted internet access.

Normally I have the remote desktop shown fullscreen on one monitor, and the local one on another. Then I encounter the problem that, sometimes, if I switch to local desktop then switch back to the remote, the remote will behave as if my Shift, Control, or Alt (maybe even mod4) key(s) are pressed, and e.g. shows the righ click menu when I simply left click on desktop, or jumps way too much when I try to scroll. This could become really annoying if I have to switch back and forth several times within minutes.

So is there a way to show the status of all the modifier keys all the time, like in a tiny floating window? I'm not sure if I have seen this kind of application anywhere, maybe a keyboard overview map will do, but it would take way too much space.

I am trying to dig a bit into the X11 programming myself, but I'd like to know if there is already something out there.

  • 2
    See show keys pressed in linux. Commented Jun 7, 2016 at 21:57
  • The key state widget does what you want (used it myself on KDE Plasma 5.18.8, Ubuntu 20.04). Make sure to check and try out the different customization options.
    – pglpm
    Commented Jul 15, 2022 at 18:56

1 Answer 1


Well, there are accessibility tools that just do that. Usually needed when sticky keys feature is active or mouse dwell.

The inconvenience related to them that they relay on Desktop Environment and GUI build on it to show indicators.

  • xkbwatch using pure Xlib, work on any DE running Xorg
  • plasma-widget-kbstate using KDE core, but can work on any DE using plasma-windowed
  • xkbmod-indicator Ubuntu/Unity, plus Gnome-shell using a proxy like appindicator-support

The main function used to pull status is XkbGetState. If you want to write small tool for that. Here an old example, so you don't have to start from scratch:

Ref: https://askubuntu.com/q/402315/26246

Note: I wrote some parts of linked references here, just kind of topic interest in Accessibility to me. I wrote also a gnome-shell extension, Keyboard Modifiers Status ( supports xorg & wayland) but it is relaying on Gnome technologies, like GDK or Clutter.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .