Show keyboard layout chart from command line
I'm looking for a way to display the current keyboard layout chart from the command line.
Unfortunately xkbprint
does not display utf-8 characters correctly (AFAICT).
In gnome, it is possible to click on the keyboard layout indicator applet and then "Show Layout Chart", which does the same thing as going through the menus of gnome-control-center
(btw, gnome-control-center keyboard
is not an acceptable solution), so there must be a way to trigger an event that would pop up this window, right?
Note that most of the time I don't use gnome-panel
.
Solution 1:
gkbd-keyboard-display -l keyboard_layout[,variant]
For example, to show greek keyboard layout chart from command line:
gkbd-keyboard-display -l gr
To show the AltGr International keyboard variant (the one based on US layout, can do Spanish, German etc)
gkbd-keyboard-display -l us,altgr-intl
It's not documented anywhere. You have to read the source code to find the parameters.