Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 12 Mar 2020 11:11:53 +0100
From:      Michael Gmelin <freebsd@grem.de>
To:        Alexander Leidinger <Alexander@Leidinger.net>
Cc:        Bob Willcox <bob@immure.com>, Mark Martinec <Mark.Martinec+freebsd@ijs.si>, <freebsd-current@freebsd.org>, <freebsd-stable@freebsd.org>
Subject:   Re: New Xorg - different key-codes
Message-ID:  <20200312111153.687dd887@bsd64.grem.de>
In-Reply-To: <170ce15cc60.27fa.fa4b1493b064008fe79f0f905b8e5741@Leidinger.net>
References:  <6897965B-8B8A-4B18-A4BB-BEC77D3D6DC7@grem.de> <20200311214930.GC5435@rancor.immure.com> <170ce15cc60.27fa.fa4b1493b064008fe79f0f905b8e5741@Leidinger.net>

next in thread | previous in thread | raw e-mail | index | archive | help


On Thu, 12 Mar 2020 10:31:40 +0100
Alexander Leidinger <Alexander@Leidinger.net> wrote:

> Hi,
> 
> This command sets the keyboard layout. You are supposed to set the
> keyboard layout which matches the physical layout of the hardware.
> This hadn't changed, it's a fundamental part of X11 since I know it
> (X11 6.5) and even before...
> [snip]

Exactly. I just personally prefer to use setxkbmap, as all my setups are
single user (one unprivileged user per machine that runs X, no shared
machines) and customization happens in $HOME that way. Makes it a
bit easier to setup a new machine (no digging in Xorg configs) and
reading ~/.xinitrc basically tells me all about my current config.

Plus, setxkbmap makes it easy to experiment, as it's applies changes
while X is running, even if one makes the those changes permanently in
an xorg config file later. And the resulting command is just one line
(in my case as short as "setxkbmap -model pc105 -layout de"), makes it
easier to support people.

Another useful application of the command is for debugging:
"setxkbmap -query" will tell you what's currently configured (regardless
how that configuration was done), e.g.,

On a machine running xorg 1.18:

# setxkbmap -query
rules:      base
model:      pc105
layout:     de

On a machine running xorg 1.20:
rules:      evdev
model:      pc105
layout:     de

In both cases the same setxkbmap command was used in ~/.xinitrc to set
model and layout. Rules were taken from Xorg's default config, which
changed to evdev in 1.20.

Cheers,
Michael

-- 
Michael Gmelin



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20200312111153.687dd887>