Show keyboard layout chart from command line

5,641
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 US AltGr International keyboard variant:

gkbd-keyboard-display -l "us(altgr-intl)"

For a complete list of layouts, see https://manpages.ubuntu.com/manpages/impish/en/man7/xkeyboard-config.7.html#layouts

Share:
5,641

Related videos on Youtube

Metaxal
Author by

Metaxal

Updated on September 18, 2022

Comments

  • Metaxal
    Metaxal over 1 year

    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.

  • Metaxal
    Metaxal about 10 years
    Fantastic, thanks a lot! I've been looking for this for several hours!
  • Håkon Hægland
    Håkon Hægland about 10 years
    +1 I had to install gkbd-keyboard-display from package gkbd-capplet..
  • A.B.
    A.B. about 9 years
    nice and simple :)
  • Guildenstern
    Guildenstern over 6 years
    The command gkbd-keyboard-display -l us,altgr-intl causes a segmentation fault for me. gkbd-keyboard-display -l "us(altgr-intl)" works, though.
  • Anders
    Anders almost 3 years
    To change layout, variant, option etc, you need to know what you can select with what. Try localectl list-x11-keymaps-models, localectl list-x11-keymaps-layouts, localectl list-x11-keymaps-variants us etc. Then use setxkbmap to test until it work as you want. Then you can use localectl set-x11-keymap ... to set it "permanently" so it work at next login. Use man pages to see more options.
  • thorstorm
    thorstorm over 2 years
    Is there a way to show the currently selected input method instead?
  • thorstorm
    thorstorm over 2 years
    I think I found out how: gkbd-keyboard-display -g 1