NetBSD Problem Report #32755

From  Mon Feb  6 00:00:08 2006
Return-Path: <>
Received: by (Postfix, from userid 31301)
	id 64AE663B879; Mon,  6 Feb 2006 00:00:08 +0000 (UTC)
Message-Id: <>
Date: Mon,  6 Feb 2006 00:00:08 +0000 (UTC)
Subject: Some keys generate wrong keysyms on USB-keyboards in console
X-Send-Pr-Version: www-1.0

>Number:         32755
>Category:       kern
>Synopsis:       Some keys generate wrong keysyms on USB-keyboards in console
>Confidential:   no
>Severity:       serious
>Priority:       high
>Responsible:    kern-bug-people
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Mon Feb 06 00:05:00 +0000 2006
>Last-Modified:  Wed Feb 08 23:15:01 +0000 2006
>Originator:     Jarmo Jaakkola
>Release:        NetBSD 2.1
NetBSD 2.1 NetBSD 2.1 (ARTHUR) #4: Wed Dec 21 19:36:58 EET 2005 i386

USB- and PS/2-keymaps seem to differ in some areas.  Couple things I have noticed:

USB-keyboards generate KS_BackSpace for the <-- key when PS/2 keyboards produce KS_Delete, which I suppose is the correct one as the console works correctly with that by default.

In the sv-encoding, the keysyms for the keycode 50 are wrong.  Instead of comma, there should be an apostrophe.  Many things are quite impossible when there's no apostrophe in the keymap.

Also, some functionality like scrolling is missing from the USB-keyboards.

There might be more but this is what caused problems for me.
Plug-in a USB-keyboard and for the second one also change the wskbd encoding to sv (or fi).

Change the lines in src/sys/dev/usb/ukbdmap.c as follows (in us-encoding):
-    KC(42),                     KS_BackSpace,
+    KC(42),  KS_Cmd_ResetEmul,  KS_Delete,

-    KC(75),  KS_Cmd_ScrollFastUp, KS_Prior,
+    KC(75),                     KS_Prior,

-    KC(75),                     KS_Next,
+    KC(75),  KS_Cmd_ScrollFastDown, KS_Next,

And in the sv-encoding:
-    KC(50),  KS_comma,          KS_asterisk,
-    KC(100), KS_less,           KS_greater,     KS_bar,

(The sv-layout is based on the dk-layout, so those two lines are redundant and the keycode 50 line is also wrong)

From: Jarmo Jaakkola <>
Subject: Re: kern/32755
Date: Thu, 9 Feb 2006 01:14:14 +0200

 Ah, there's a slight mistake here.  The line with KC(100) in the sv-layout
 is actually needed (I misread something there).  But then again, one more
 line is needed for the sv-layout:

 +    KC(46),  KS_dead_acute,     KS_dead_grave,

 And one line of the sv_nodead-layout needs to be changed:

     KC(46),  KS_apostrophe,     KS_grave,

 There's no bar on the key with acute and grave in Finnish/Swedish
 keyboards.  There is a slight catch though: I cannot be certain that
 there are no keyboards, which lack the key with greater, less and bar
 symbols.  If I recall correctly, I have seen Finnish keyboards, which
 lack one (or more) key(s) from the common layout but I cannot remember,
 which key(s).

NetBSD Home
NetBSD PR Database Search

(Contact us) $NetBSD: query-full-pr,v 1.39 2013/11/01 18:47:49 spz Exp $
$NetBSD:,v 1.8 2006/05/07 09:23:38 tsutsui Exp $
Copyright © 1994-2007 The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.