Subject: bin/21882: /etc/rc.d/wscons, /etc/wscons.conf do not configure alternate devices
To: None <gnats-bugs@gnats.netbsd.org>
From: The Grey Wolf <greywolf@rivendell.starwolf.com>
List: netbsd-bugs
Date: 06/14/2003 12:18:11
>Number:         21882
>Category:       bin
>Synopsis:       rc.d/wscons and wscons.conf do not allow other devices
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    bin-bug-people
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Sat Jun 14 19:19:00 UTC 2003
>Closed-Date:
>Last-Modified:
>Originator:     Greywolf
>Release:        NetBSD 1.6T 11 June 2003
>Organization:
Star Wolf Innovations
>Environment:
System: NetBSD rivendell.starwolf.com 1.6T NetBSD 1.6T (RIVENDELL) #6: Tue Jun 10 23:58:43 PDT 2003 root@rivendell.starwolf.com:/usr/src/sys/arch/i386/compile/RIVENDELL i386
Architecture: i386
Machine: i386
>Description:
	/etc/rc.d/wscons, in tandem with /etc/wscons.conf, does not allow
	for configurations of alternate devices such as, say, a USB keyboard
	where a PS2 port is also present.  In particular, keyboard encodings
	do not get mapped to the proper keyboard, even when "keyboard 1"
	is provided.

	Also of note is that wskbd1 cannot be assigned as the system
	console, but that's a bug for another day.

>How-To-Repeat:
	Hook up a USB keyboard to a PS2/USB combo machine.
	enable the line "keyboard 1" in /etc/wscons.conf
	insert the line "encoding us.swapctrlcaps" in /etc/wscons.conf

	Note that the encoding will not be changed for the USB keyboard.

>Fix:
	I don't really know what the "correct" fix would be, but I have
	a couple of suggestions:

	1.  (easiest, but, no doubt, 'an egregious hack'):
	    in the 'encoding' line in rc.conf/wscons, insert the 
	    following:
		... ${kbd:+-f /dev/wskbd$kbd} ...

	    This allows for different encodings and keyboard attrs to
	    be specified for different keyboards.  This could probably
	    be extended to include mice.

	2.  (non-trivial, but probably more proper):
	    Rewhack the wscons.cfg file so that encodings can be specified
	    per-keyboard; this would require also rewriting portions of
	    the rc script.
>Release-Note:
>Audit-Trail:
>Unformatted: