This question is mostly for curiosity about keyboard stuff in Gnome and/or XKB. The below was done on Ubuntu Gnome 16.04, but I believe things are they same in later Ubuntu and Gnome versions as well.

When adding “Input Sources” (keyboard layouts) in Gnome:

GUI to choose Input Sources in Gnome

… there’s a little keyboard button at the bottom right that shows the input source on a standard looking keyboard:

Visual representation of the English (US) keyboard layout in Gnome

I believe the keyboard in the picture is a “pc104” keyboard.

As you can see in the first picture, I clicked the keyboard button while “English (US)” was selected, but there’s also “Swedish” available. Clicking the keyboard button with “Swedish” selected does show the Swedish layout as expected, but still on a pc104 keyboard like before. The standard in Sweden is pc105 (which as a differently shaped Enter key, and an extra key to the left of Z; see IBM PC keyboard for more information). This is not a super big deal, but we’ll get back to that.

As far as I know, pc104 and pc105 are examples of two “geometries” in XKB. On my system they are defined in /usr/share/X11/xkb/geometry/pc.

/usr/share/X11/xkb/geometry also contains other geometries. One that caught my eye was teck. Since I own such a keyboard (a “Truly Ergonomic Keyboard”) I got curious and wanted to know what that geometry would look like rendered on the screen.

My first thought was to try to make Gnome’s keyboard display thing show a pc105 or teck geometry. I couldn’t figure out how to do this, though. I found gkbd-keyboard-display, but it seems to only support choosing “layout” and “group”.

Next, I found out about xkbprint, and managed to use it to display both pc105 and teck:

setxkbmap us -geometry 'pc(pc105)' -print | xkbcomp - - | xkbprint - - | ps2pdf - > pc105.pdf
setxkbmap us -geometry 'teck(teck227)' -print | xkbcomp - - | xkbprint - - | ps2pdf - > teck.pdf

Here’s what the teck layout looks like, for example:

Truly Ergonomic Keyboard layout, rendered by “xkbprint”

Now on to some specific questions:

  • Does the “Gnome keyboard display” support other XKB geometries than pc105?
  • How is an XKB geometry chosen? Plugging in my TECK, setxkbmap -print still seems to indicate a pc104 keyboard.
  • What are XKB geometries used for? Just for visualization?
  • Is there any other program (even if inside another desktop environment or whatever) than xkbprint that can do anything useful with non-pc104 XKB geometries? Someone has taken the time to create the “teck” geometry for example – I wonder how it’s supposed to come to use for TECK Linux users?

1 Answer 1


In debian, GNOME used to default to values defined in /etc/default/keyboard. Four your case, you should have XKBMODEL=tech in this file. dpkg-reconfigure keyboard-configuration allows you to configure this file using menus, but does not support multiple layouts like swedish + english(us).

However, I have some trouble to get GNOME to follow xkbmodel as set by keyboard-configuration.

You must log in to answer this question.

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