How to display the current keyboard layout?
Solution 1
xkeycaps
seems to do what you want, if I understand you correctly.
Solution 2
From the command line: gkbd-keyboard-display -l <layout>
.
To see what your installed keyboards are (for example to find the layout code to use in the command above) use setxkbmap -query
.
Solution 3
Selecting the current layout with gkbd-keyboard-display
is possible like so:
#! /usr/bin/env fish
set layout (setxkbmap -query | grep layout | tr -s ' ' | cut -d ' ' -f2)
set variant (setxkbmap -query | grep variant | tr -s ' ' | cut -d ' ' -f2)
gkbd-keyboard-display -l $layout\t$variant
Or, similarly:
#! /bin/bash
layout=`setxkbmap -query | grep layout | tr -s ' ' | cut -d ' ' -f2`
variant=`setxkbmap -query | grep variant | tr -s ' ' | cut -d ' ' -f2`
gkbd-keyboard-display -l ${layout}$'\t'${variant}
Solution 4
You can use xkbprint
to print the current layout.
For example to print the current layout as PDF use
xkbprint -color "${DISPLAY}" - |\
ps2pdf - > current_keyboard_layout.pdf
which produces:
Solution 5
Manjaro Settings Manager > Keyboard Settings
It looks like this:
Related videos on Youtube
landroni
Updated on September 18, 2022Comments
-
landroni over 1 year
Is there a utility that allows to graphically display the current keyboard layout?
This can be useful, for example, when writing in a foreign language and having the physical keyboard only indicating the local language (positioning of symbols, etc.). I would like to get a display similar to the following:
-
landroni over 10 yearsIndeed! I had it installed, but forgot the command.
-
Alex Stragies over 7 yearsThis will not work (= display the current mapping visually as a picture), if the user has made changes to the keysyms with e.g.
xmodmap
. If you mouseover the changed key(s), the keysym line in the top half of thexkeycaps
is updated correctly though. I am researching the same question, but I have made lots of changes with xmodmap. So I was looking for a nice means to display current key mappings too. -
Colonel Panic over 2 yearsIMHO this is the nicest diagram, although it doesn't distinguish dead keys in any way gitlab.gnome.org/GNOME/libgnomekbd/-/issues/10