To integrate this feature nicely in the Gnome environment, create the following file:
With the following content:
Name=Show keyboard layout
Exec=gkbd-keyboard-display -l "us(altgr-intl)"
Press ALT-F2, and enter ‘r’ to restart the Gnome desktop if you use X11, or restart the session if you use Wayland.
To open the layout window, press the Super key (e.g. Windows key), and then enter the first letters of “Show keyboard layout” until the proper entry is shown. Finally, press enter.
The layout shown is hard coded. You can query the keyboard currently used with the following command and adapt the .desktop file accordingly using the following command line: