NetBSD Problem Report #57234
From www@netbsd.org Fri Feb 17 20:22:33 2023
Return-Path: <www@netbsd.org>
Received: from mail.netbsd.org (mail.netbsd.org [199.233.217.200])
(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits))
(Client CN "mail.NetBSD.org", Issuer "mail.NetBSD.org CA" (not verified))
by mollari.NetBSD.org (Postfix) with ESMTPS id EB8E61A9239
for <gnats-bugs@gnats.NetBSD.org>; Fri, 17 Feb 2023 20:22:32 +0000 (UTC)
Message-Id: <20230217202232.1B4981A923A@mollari.NetBSD.org>
Date: Fri, 17 Feb 2023 20:22:32 +0000 (UTC)
From: m.kozlowski@mini.pw.edu.pl
Reply-To: m.kozlowski@mini.pw.edu.pl
To: gnats-bugs@NetBSD.org
Subject: https://netbsd.org/docs/guide/en/chap-cons.html#chap-cons-wscons-wskbd : "# wsconsctl -k -w encoding=pl" *should* work. It doesn't
X-Send-Pr-Version: www-1.0
>Number: 57234
>Category: port-amd64
>Synopsis: https://netbsd.org/docs/guide/en/chap-cons.html#chap-cons-wscons-wskbd : "# wsconsctl -k -w encoding=pl" *should* work. It doesn't
>Confidential: no
>Severity: non-critical
>Priority: medium
>Responsible: port-amd64-maintainer
>State: open
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Fri Feb 17 20:25:00 +0000 2023
>Last-Modified: Mon Oct 20 14:05:01 +0000 2025
>Originator: Marek
>Release: 9.3, fresh install
>Organization:
>Environment:
NetBSD t400net 9.3 NetBSD 9.3 (GENERIC) #0: Thu Aug 4 15:30:37 UTC 2022 mkrepro@mkrepro.NetBSD.org:/usr/src/sys/arch/amd64/compile/GENERIC amd64
>Description:
Fresh install.
# wsconsctl -k -w encoding=pl
wsconsctl: WSKBDIO_SETENCODING: invalid argument
It work for Italian, btw
>How-To-Repeat:
Exactly as above
>Fix:
>Audit-Trail:
From: RVP <rvp@faeroes.freeshell.org>
To: gnats-bugs@NetBSD.org
Cc:
Subject: Re: port-amd64/57234: https://netbsd.org/docs/guide/en/chap-cons.html#chap-cons-wscons-wskbd
: "# wsconsctl -k -w encoding=pl" *should* work. It doesn't
Date: Sat, 18 Feb 2023 08:58:32 +0000 (UTC)
Looks like that section and the wskbd.4 manpage should be updated. The
"pl" encoding is not present in the kernel. Neither are these: cz, ru, ua.
The "fi" (Finnish) encoding isn't present either, but, setting it works
because "sv" and "fi" share the same numeric value:
```
$ egrep 'KB_(FI|SV)' /usr/include/dev/wscons/wsksymdef.h
action(KB_FI, 0, 0x0900, "fi", , "Finnish") \
action(KB_SV, 0, 0x0900, "sv", , "Swedish") \
$
```
To get a "pl" encoding, try one of the keymap files present in
/usr/share/wscons/keymaps/
In /etc/wscons.conf, add a line like:
mapfile /usr/share/wscons/keymaps/pckbd.pl.iso8859-2
-RVP
From: Marek Kozlowski <m.kozlowski@mini.pw.edu.pl>
To: <gnats-bugs@netbsd.org>
Cc:
Subject: Re: port-amd64/57234:
https://netbsd.org/docs/guide/en/chap-cons.html#chap-cons-wscons-wskbd : "#
wsconsctl -k -w encoding=pl" *should* work. It doesn't
Date: Tue, 21 Feb 2023 09:32:52 +0100
On 2/18/23 10:00, RVP wrote:
> The following reply was made to PR port-amd64/57234; it has been noted by GNATS.
>
> From: RVP <rvp@faeroes.freeshell.org>
> To: gnats-bugs@NetBSD.org
> Cc:
> Subject: Re: port-amd64/57234: https://netbsd.org/docs/guide/en/chap-cons.html#chap-cons-wscons-wskbd
> : "# wsconsctl -k -w encoding=pl" *should* work. It doesn't
> Date: Sat, 18 Feb 2023 08:58:32 +0000 (UTC)
>
> Looks like that section and the wskbd.4 manpage should be updated. The
> "pl" encoding is not present in the kernel. Neither are these: cz, ru, ua.
> The "fi" (Finnish) encoding isn't present either, but, setting it works
> because "sv" and "fi" share the same numeric value:
>
> ```
> $ egrep 'KB_(FI|SV)' /usr/include/dev/wscons/wsksymdef.h
> action(KB_FI, 0, 0x0900, "fi", , "Finnish") \
> action(KB_SV, 0, 0x0900, "sv", , "Swedish") \
> $
> ```
>
> To get a "pl" encoding, try one of the keymap files present in
>
> /usr/share/wscons/keymaps/
>
> In /etc/wscons.conf, add a line like:
>
> mapfile /usr/share/wscons/keymaps/pckbd.pl.iso8859-2
After that change may keyboard gets completely unusable, I'm unable to
even login:
qwertyuiop keys map to mnepqrstov or sth like this :-(
Best regards,
Marek
From: RVP <rvp@SDF.ORG>
To: gnats-bugs@netbsd.org
Cc: m.kozlowski@mini.pw.edu.pl
Subject: Re: port-amd64/57234: https://netbsd.org/docs/guide/en/chap-cons.html#chap-cons-wscons-wskbd
: "# wsconsctl -k -w encoding=pl" *should* work. It doesn't
Date: Sat, 25 Feb 2023 07:35:38 +0000 (UTC)
On Tue, 21 Feb 2023, Marek Kozlowski wrote:
> After that change may keyboard gets completely unusable, I'm unable to
> even login:
>
> qwertyuiop keys map to mnepqrstov or sth like this :-(
>
If you have a USB keyboard, please try this keymap file
(ukbd.pl.iso8859-2):
```
# $Id$
#
# This is a Polish QWERTY keymap for USB keyboards.
# Base keycode = US (sys/dev/hid/hidkbdmap.c)
keycode 4=a A plusminus exclamdown
keycode 6=c C ae AE
keycode 8=e E ecircumflex Ecircumflex
keycode 15=l L threesuperior sterling
keycode 17=n N ntilde Ntilde
keycode 18=o O oacute Oacute
keycode 22=s S paragraph brokenbar
keycode 27=x X onequarter notsign
keycode 29=z Z questiondown macron
keycode 230=Mode_switch Multi_key
```
If you have both PS/2 and USB keyboards, then you'll have to load
the correct keymap for each keyboard. Use something like this in
/etc/rc.local:
```
mapkey() {
dev=$1
file=$2
while read line
do echo "$line" | grep -Eq '^[[:blank:]]*(#|$)' ||
wsconsctl -f /dev/"$dev" -w map+="$line"
done < "$file"
}
mapkey wskbd0 /etc/key-ps2.txt >/dev/null && echo -n ' wskbd0'
mapkey wskbd1 /etc/key-usb.txt >/dev/null && echo -n ' wskbd1'
unset -f mapkey
```
Right now there's no simple method to apply a per-keyboard mapfile
in /etc/rc.conf
-RVP
From: "Nia Alarie" <nia@netbsd.org>
To: gnats-bugs@gnats.NetBSD.org
Cc:
Subject: PR/57234 CVS commit: src/sys/dev
Date: Sat, 24 May 2025 16:50:54 +0000
Module Name: src
Committed By: nia
Date: Sat May 24 16:50:54 UTC 2025
Modified Files:
src/sys/dev/hid: hidkbdmap.c
src/sys/dev/pckbport: wskbdmap_mfii.c
Log Message:
wskbd(4): Define USB and PS/2 keymaps for KB_PL
This is the de-facto standard "Polish programmers" QWERTY keyboard,
what X11 simply calls "Polish". It's a simple variation of US QWERTY
with some extra characters when right alt is pressed.
Defining this layout is slightly optimistic, since even with latin-2
fonts loaded and the appropriate locale set, wscons seems to struggle
to input most of these characters.
Regardless, this allows the supposedly supported "pl" encoding
to not fail loading with an error message, and allows X11 to
auto-detect the keyboard layout (defining KB_PL and as an alias of
KB_US also accomplishes this goal), with room for proper UTF-8
support in the future.
PR port-amd64/57234 "# wsconsctl -k -w encoding=pl" *should* work.
PR kern/57844 wscons doesn't support encoding=pl contrary to wskbd(4) man page
PR install/58405 Selecting Polish keyboard type in sysinst is useless
To generate a diff of this commit:
cvs rdiff -u -r1.15 -r1.16 src/sys/dev/hid/hidkbdmap.c
cvs rdiff -u -r1.35 -r1.36 src/sys/dev/pckbport/wskbdmap_mfii.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
From: "Martin Husemann" <martin@netbsd.org>
To: gnats-bugs@gnats.NetBSD.org
Cc:
Subject: PR/57234 CVS commit: [netbsd-10] src/sys/dev
Date: Mon, 20 Oct 2025 14:03:00 +0000
Module Name: src
Committed By: martin
Date: Mon Oct 20 14:03:00 UTC 2025
Modified Files:
src/sys/dev/hid [netbsd-10]: hidkbdmap.c
src/sys/dev/pckbport [netbsd-10]: wskbdmap_mfii.c
Log Message:
Pull up following revision(s) (requested by nia in ticket #1180):
sys/dev/hid/hidkbdmap.c: revision 1.16
sys/dev/pckbport/wskbdmap_mfii.c: revision 1.36
wskbd(4): Define USB and PS/2 keymaps for KB_PL
This is the de-facto standard "Polish programmers" QWERTY keyboard,
what X11 simply calls "Polish". It's a simple variation of US QWERTY
with some extra characters when right alt is pressed.
Defining this layout is slightly optimistic, since even with latin-2
fonts loaded and the appropriate locale set, wscons seems to struggle
to input most of these characters.
Regardless, this allows the supposedly supported "pl" encoding
to not fail loading with an error message, and allows X11 to
auto-detect the keyboard layout (defining KB_PL and as an alias of
KB_US also accomplishes this goal), with room for proper UTF-8
support in the future.
PR port-amd64/57234 "# wsconsctl -k -w encoding=pl" *should* work.
PR kern/57844 wscons doesn't support encoding=pl contrary to wskbd(4) man page
PR install/58405 Selecting Polish keyboard type in sysinst is useless
To generate a diff of this commit:
cvs rdiff -u -r1.15 -r1.15.4.1 src/sys/dev/hid/hidkbdmap.c
cvs rdiff -u -r1.35 -r1.35.4.1 src/sys/dev/pckbport/wskbdmap_mfii.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
(Contact us)
$NetBSD: query-full-pr,v 1.47 2022/09/11 19:34:41 kim Exp $
$NetBSD: gnats_config.sh,v 1.9 2014/08/02 14:16:04 spz Exp $
Copyright © 1994-2025
The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.