First time with freebsd and weird keyboard issue

From: Dominique Michel <dominique.c.michel_at_gmail.com>
Date: Tue, 26 Nov 2024 10:39:12 UTC
Hi,

I am the main fvwm-crystal maintainer and I am working on adding
freebsd support to it. To do that, I installed the last freebsd version
and I saw a double issue with the keyboard.

First:
In /etc/rc.conf
keymap="ch-fr.acc.kbd"

In order to understand how to reproduce these issues, I do 2 test user
accounts with different shells, sh and bash. With both of them, after
login, the keyboard is working fine with the ttys.

Then I followed chapter 25 of the handbook and put in ~/.login_conf:
me:\
:charset=UTF-8:\
:lang=fr_ch.UTF-8:

and ran  cap_mkdb ~/.login_conf

After logout and login, the keyboard stopped to work well in both
accounts. I get the correct language map (keys like q and z are at the
right place), composed keys like [ and { are fine, but the same keys as
simple keys à and è (the accented keys) doesn't work anymore, they are
dead.

If I comment these lines in .login_conf and remove the file generated by
cap_mkdb, the keyboard is working fine again.

As a freebsd newbie, maybe I missed something, but I  think that issue
should be reported to you anyway.

# # #

Launching fvwm-crystal with fvwm3 (or fvwm2) via startx, I get an even
weirder keyboard issue,
see https://forums.freebsd.org/threads/wrong-keyboard-map-in-x.95778/

Best,
Dominique