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: Sat Feb 25 07:40:01 +0000 2023
>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
(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-2023
The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.