How does one use the setxkbmap -geometry option

x11xkb

I have a Sun Type7 keyboard on my Debian Linux (/etc/debian_version == 7.8) box, and, since it appears to be much like the Sun type6 I attempted:

$ (setxkbmap -model sun6 -layout us -geometry 'sun(type6)' -v 10 ; setxkbmap -print) |sed 's/^/    /'
Setting verbose level to 10
locale is C
Warning! Multiple definitions of keyboard model
         Using command line, ignoring X server
Warning! Multiple definitions of keyboard layout
         Using command line, ignoring X server
Trying to load rules file ./rules/evdev...
Success.
Warning! Multiple definitions of geometry
         Using command line, ignoring rules file
Applied rules from evdev:
rules:      evdev
model:      sun6
layout:     us
Trying to build keymap using the following components:
keycodes:   evdev+aliases(qwerty)
types:      complete
compat:     complete
symbols:    pc+sun_vndr/us(type6)+inet(evdev)
geometry:   sun(type6)
xkb_keymap {
    xkb_keycodes  { include "evdev+aliases(qwerty)" };
    xkb_types     { include "complete"  };
    xkb_compat    { include "complete"  };
    xkb_symbols   { include "pc+sun_vndr/us(type6)+inet(evdev)" };
    xkb_geometry  { include "pc(pc104)" };
};

Note that the first bit of output looks like it tries to set the geometry to 'sun:type6', but that the reported xkb_geometry ends up as 'pc(pc104)'

There does appear to be a type6 geometry defined in my /usr/share/X11/xkp/geometry/sun file, but the subsequent 'setxkbmap -print' seems insensitive to the '-geometry xxxx' options I've tried (where xxxx in pc101, pc104 ).

How does one configure the 'setxkbmap -geometry' option so that something like:

xkbprint :0 -  |ps2pdf - > sun6.pdf # try to make use of the xkb_geometry

… would display a picture of the Sun type 6 keyboard?

Edited to change sun:type6 to sun(type6): The format of the options seems to be 'file(entry)' within the /usr/share/X11/xkb/option_name/ directory.

Best Answer

Per don_crissti's comments above, I eventually edited my /usr/share/X11/xkb/rules/evdev to include these lines under the !model = geometry section:

!model        =       geometry
...
sun6          =       sun(type6)
sun5          =       sun(type5)
sun4          =       sun(type4)

The http://anti.teamidiot.de/nei/2010/06/sun_unix_keyboard_linux_gnome/ was also a good resource in understanding what these files do.

My current setup is below, and each xkb_(WHAT) line is interpretable by looking in the appropriate /usr/share/X11/xkb/(WHAT) directory for the files on the RHS.

$ setxkbmap -print
xkb_keymap {
    xkb_keycodes  { include "evdev+aliases(qwerty)" };
    xkb_types     { include "complete"  };
    xkb_compat    { include "complete"  };
    xkb_symbols   { include "pc+sun_vndr/us(type6)+inet(evdev)+ctrl(nocaps)"    };
    xkb_geometry  { include "sun(type6)"    };
};
$ 

The following will set a the xkb/geometry to the entry defined as 'type6' within the /usr/share/X11/xkb/geometry/sun file:

setxkbmap -geometry 'sun(type6)' 

If you use the -print option while setting the options, it merely echos the options given and does not report the resultant configuration. Do setxbkmap -print without other options to see what is set.