GNOME Bugzilla – Bug 729115
Try to display most likely physical geometry of the keyboard layout in the preview widget
Last modified: 2021-06-09 16:02:47 UTC
Transferring from https://bugzilla.gnome.org/show_bug.cgi?id=694623#c4 . I noticed something about the keyboard layout preview widget today; it respects the xkb 'geometry' setting in determining what physical keys to draw. In practice, with the evdev ruleset - which I think everything uses these days - that setting will almost always be 'pc104', which is the geometry used by a US-style keyboard with Windows keys (pc101 is US-style without Windows keys). When drawing a preview of a layout which is more commonly associated with the 'pc105' or 'pc102' physical keyboard - where the enter key and one other key in that neighbourhood are different, and there is an extra key between the left 'shift' key and the first alphanumeric key on the row above space (Z on a US/UK layout, Y on German, probably something else on other layouts) - this looks rather odd and means one key is missing. If it just defaulted to 'pc105', though, I suppose the illustration of the normal US layout (and any other layouts which use the 101/104-key physical keyboard) would be wrong. To get it exactly right there'd need to be a source of data about which keyboard layouts are most commonly associated with which geometries, I guess, and the place to put that would probably be langtable. But there's a fairly simple approximation you can use that looks like it'd be correct most of the time: if the layout is a US variant then use the pc104 geometry, if it's anything else, use the pc105 geometry. From a quick peruse of https://en.wikipedia.org/wiki/QWERTY , https://en.wikipedia.org/wiki/QWERTZ , and https://en.wikipedia.org/wiki/AZERTY it looks like most everything that isn't a US variant uses the pc105 geometry, the exceptions being a few which use an oddball geometry which looks like pc104 around the Enter key but has the extra key between left shift and Z, and Vietnamese and "Turkish Q", which use the pc104 geometry.
Just to clarify - this is about the window that pops up when you click the button at bottom right of the "Region & Language" screen with a keyboard layout selected, to illustrate the selected layout.
GNOME is going to shut down bugzilla.gnome.org in favor of gitlab.gnome.org. As part of that, we are mass-closing older open tickets in bugzilla.gnome.org which have not seen updates for a longer time (resources are unfortunately quite limited so not every ticket can get handled). If you can still reproduce the situation described in this ticket in a recent and supported software version, then please follow https://wiki.gnome.org/GettingInTouch/BugReportingGuidelines and create a new enhancement request ticket at https://gitlab.gnome.org/GNOME/gnome-control-center/-/issues/ Thank you for your understanding and your help.