From nobody Wed Feb 1 16:35:53 2023 X-Original-To: freebsd-current@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4P6SGL6LZwz3cfQ3 for ; Wed, 1 Feb 2023 16:35:54 +0000 (UTC) (envelope-from se@FreeBSD.org) Received: from smtp.freebsd.org (smtp.freebsd.org [IPv6:2610:1c1:1:606c::24b:4]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "smtp.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4P6SGL5s3Kz3GBw; Wed, 1 Feb 2023 16:35:54 +0000 (UTC) (envelope-from se@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1675269354; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=LAyjwCf4UPOViLMgFAxA2yZkfrdP/VV1Dj0S1yNnu3c=; b=ezcFid8XmQOpYhnFbRnANxsdOkCKt5lTTMuQ7Y57EOyV2hG86yRn0sqrABEBqMztYlEnaX JQCcUlS/fJhRLhh6eJU7b//pQpU3rryUAzANMjGBzfxkWAd1N2rK9xEILCmDmwLzCXeEnx 4l9IqV1VLJbgmHX6URlAI0lz32446rRVw4SprRQUfrnfee+hnXj5GeS4+OM8oonsbXsQ6O Q48M6giJQHTKCjmGiUzoAqAw26AQ0DDmzmUqYGLgnPX2nvpRkN7oOWsJKIauZFwYkmo2Wd EfXEjFppimd8AEjpf4ICtDGGKRmwGbHStq7KaBvGH9yQxLlgk0eDQuLsGRh9pA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1675269354; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=LAyjwCf4UPOViLMgFAxA2yZkfrdP/VV1Dj0S1yNnu3c=; b=L7lXs0fYi9vevo8k4rUjJPlFn5yAOhbnN+jXyxKy05DTHGO0LuIHQ+jETOxdyii0tVAIOq iMNtej/nlqgQaUzviflb6H2hK2ckkiw4BLb1VOUsMI+Zlx+JbfPcL72N/QHdu0CDg1HDTD hwoizD11gsmAlacg/xDgc4ShmB5x9CvKu7Dw9MemPSWuRPHwBIXt6WAeRoBdztl4Ho+EnB fEr96Pc+YlCypr83ZYS+JOcHg8zjXDAVkQ9lQ3MLhSCExqnqC3dfevVrs15aeb13sqMBXB eWeoNC9+TdO4CqgWzFcBwUxI7NxsiOUbmmxQAoPNOeWErALvKmwWjviWTIeMwQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1675269354; a=rsa-sha256; cv=none; b=dof4iaozD7WkMUx/3N7LDvM2yzrQw2Uzq2EKIPI52CXkVWkfaUJ17+MGVElROQl1FzbcLO +qPzb+Fj7aWscVUUvHAT/YKDXRerN3hCbZuoRsr9Mrjk+SH5G+4ZFIE+h/qaGKq3UoJs52 jtwIFX1kTMvv+quvxM/AlNBHXNFkGRnbELW7JHG4gBzTi0uNQPVLbcczNjBuEfYjE5nmlm O8NJXm6ArbUf+mTMPFtpXaZrKz9kuJ4stF7+hA30wq2FjaVvUPiHsl0ixNu3T5KV2rJgai Sr4+44ApiTuue4993HSZt8xZ/bnpc5hWt7Adm0PKiK02vc1elLewmV52ns2VGg== Received: from [IPV6:2003:cd:5f2a:1000:9173:c1ae:9b8:a4af] (p200300cd5f2a10009173c1ae09b8a4af.dip0.t-ipconnect.de [IPv6:2003:cd:5f2a:1000:9173:c1ae:9b8:a4af]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (Client did not present a certificate) (Authenticated sender: se/mail) by smtp.freebsd.org (Postfix) with ESMTPSA id 4P6SGL1jlsz16DW; Wed, 1 Feb 2023 16:35:54 +0000 (UTC) (envelope-from se@FreeBSD.org) Message-ID: <60be58f2-c33d-5707-500b-1746c6fc3d67@FreeBSD.org> Date: Wed, 1 Feb 2023 17:35:53 +0100 List-Id: Discussions about the use of FreeBSD-current List-Archive: https://lists.freebsd.org/archives/freebsd-current List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-current@freebsd.org MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:102.0) Gecko/20100101 Thunderbird/102.7.0 From: Stefan Esser Subject: Re: vt and keyboard accents Content-Language: de-DE, en-US To: Yuri References: <70f53d17-46eb-c299-1a93-bf28858c1685@aetern.org> Cc: FreeBSD CURRENT In-Reply-To: <70f53d17-46eb-c299-1a93-bf28858c1685@aetern.org> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-ThisMailContainsUnwantedMimeParts: N Am 29.01.23 um 01:54 schrieb Yuri: > Looking into an issue with accents input for vt and cz (so > /usr/share/vt/keymaps/cz.kbd) keyboard where some of the accents are > working and other result weird unrelated characters output. > > Checking kbdcontrol -d output, there is an obvious difference with > keymap contents -- all mappings are trimmed down to 1 byte after reading: > > kbdcontrol: > dacu 180 ( 180 180 ) ( 'S' 'Z' ) ( 'Z' 'y' ) ( 's' '[' ) > ( 'z' 'z' ) ( 'R' 'T' ) ( 'A' 193 ) ( 'L' '9' ) > ( 'C' 006 ) ( 'E' 201 ) ( 'I' 205 ) ( 'N' 'C' ) > ( 'O' 211 ) ( 'U' 218 ) ( 'Y' 221 ) ( 'r' 'U' ) > ( 'a' 225 ) ( 'l' ':' ) ( 'c' 007 ) ( 'e' 233 ) > ( 'i' 237 ) ( 'n' 'D' ) ( 'o' 243 ) ( 'u' 250 ) > ( 'y' 253 ) > > keymap: > dacu 0xb4 ( 0xb4 0xb4 ) ( 'S' 0x015a ) ( 'Z' 0x0179 ) > ( 's' 0x015b ) > ( 'z' 0x017a ) ( 'R' 0x0154 ) ( 'A' 0xc1 ) > ( 'L' 0x0139 ) > ( 'C' 0x0106 ) ( 'E' 0xc9 ) ( 'I' 0xcd ) > ( 'N' 0x0143 ) > ( 'O' 0xd3 ) ( 'U' 0xda ) ( 'Y' 0xdd ) > ( 'r' 0x0155 ) > ( 'a' 0xe1 ) ( 'l' 0x013a ) ( 'c' 0x0107 ) > ( 'e' 0xe9 ) > ( 'i' 0xed ) ( 'n' 0x0144 ) ( 'o' 0xf3 ) > ( 'u' 0xfa ) > ( 'y' 0xfd ) > > Source of the problem is the following definition in sys/sys/kbio.h: > > struct acc_t { > u_char accchar; > u_char map[NUM_ACCENTCHARS][2]; > }; > > While the keymaps were converted to have the unicode characters for vt > in the commit below, the array to store them (map) was missed, or was > there a reason for this? > > --- > commit 7ba08f814546ece02e0193edc12cf6eb4d5cb8d4 > Author: Stefan Eßer > Date: Sun Aug 17 19:54:21 2014 +0000 > > Attempt at converting the SYSCONS keymaps to Unicode for use with > NEWCONS. > I have spent many hours comparing source and destination formats, > and hope > to have caught the most severe conversion errors. > --- > > I have tried the following patch and it allows me to enter all accents > documented in the keymap, though I must admit I'm not sure it does not > have hidden issues: > > diff --git a/sys/sys/kbio.h b/sys/sys/kbio.h > index 7f17bda76c5..fffeb63e226 100644 > --- a/sys/sys/kbio.h > +++ b/sys/sys/kbio.h > @@ -200,7 +200,7 @@ typedef struct okeymap okeymap_t; > > struct acc_t { > u_char accchar; > - u_char map[NUM_ACCENTCHARS][2]; > + int map[NUM_ACCENTCHARS][2]; > }; > I have extended the range of the map array entries to 16 bits, which is sufficient for all currently defined keymap entries, see commit 1e0853ee8403. Thanks for reporting! Regards, STefan