0

There is a single "list" (in whichever storage form, even distributed across several files) of possible models that setxbmap understands. If the argument to setxbmap -model is not in that list, the command setxbmap would not understand it.

My guess (or expectation) is that the man page for xkeyboard-config should produce its output from the same "list" (i.e., the same sources) as used by setxbmap (at least when using a default configuration; I would understand if man did not know about user added configuration files). That doesn't seem to be the case. Command man -P cat xkeyboard-config does not list abnt, nor it is listed here, e.g. But setxkbmap -model abnt ... works. In this sense, man xkeyboard-config would be misleading.

How can the "mismatch" be explained?

An additional question appeared after tinkering. If I execute setxkbmap -model khassss ... (a randomly invented model), setxkbmap does not complain, and even setxkbmap -query prints ... model: khassss ....

What would setxkbmap actually take for the model in this case, to define its behaviour?

Notes:

  1. man -P cat xkeyboard-config doesn't even give abnt or abnt2 as a layout or variant, but I guess this is irrelevant for the question.

  2. I am not sure the version I have plays any role in the mismatch referred to (I expect it doesn't)

    $ apt-cache policy xkb-data
    xkb-data:
      Installed: 2.29-2
      Candidate: 2.29-2
      Version table:
     *** 2.29-2 500
            500 http://ar.archive.ubuntu.com/ubuntu focal/main amd64 Packages
            500 http://ar.archive.ubuntu.com/ubuntu focal/main i386 Packages
            100 /var/lib/dpkg/status
    

2 Answers2

1

The default Portuguese (Brazil) keyboard layout is designed with a Brazilian ABNT2 keyboard in mind. I'm thinking that, given the presence of that layout, it may not be considered necessary to specify abnt as a model.

0

The explanation to the mismatch

  1. man -P cat xkeyboard-config does not list abnt, but
  2. setxkbmap -model abnt ... works

is likely the following:

  1. Model abnt does not exist (that is why it is not listed with command 1), and
  2. setxkbmap -model <any_model> ... does not throw an error when using a non-existing any_model.

Observation 1 is supported by (this would not find related files in the user directory, but I have none)

$ find /usr/share/X11/xkb/ -type f -exec grep -nH --color abnt {} \;
/usr/share/X11/xkb/geometry/pc:831:xkb_geometry "abnt2" {
/usr/share/X11/xkb/geometry/pc:886:}; // End of "abnt2" geometry
/usr/share/X11/xkb/symbols/sun_vndr/br:84:  xkb_symbols "abnt2" {
/usr/share/X11/xkb/symbols/sun_vndr/br:85:  include "br(abnt2)"
/usr/share/X11/xkb/symbols/br:2:xkb_symbols "abnt2" {
/usr/share/X11/xkb/symbols/br:49:    include "br(abnt2)"
/usr/share/X11/xkb/symbols/br:66:    include "br(abnt2)"

and observation 2 is detailed in the OP.

Perhaps Gunnar Hjalmarsson referred to this, but that wasn't very clear to me.