Subject: kern/6735: UK keyboard with wscons
To: None <gnats-bugs@gnats.netbsd.org>
From: Patrick Welche,SCC,ext.35710, <prlw1@newn.cam.ac.uk>
List: netbsd-bugs
Date: 01/05/1999 19:48:51
>Number:         6735
>Category:       kern
>Synopsis:       UK keyboard with wscons
>Confidential:   no
>Severity:       non-critical
>Priority:       high
>Responsible:    kern-bug-people (Kernel Bug People)
>State:          open
>Class:          change-request
>Submitter-Id:   net
>Arrival-Date:   Tue Jan  5 12:05:00 1999
>Last-Modified:
>Originator:     Patrick Welche
>Organization:
	
>Release:        Jan  4 19:26 GMT
>Environment:
System: NetBSD 1.3I: Mon Jan 4 21:46:35 GMT 1999 i386


>Description:
UK keyboards have pound sterling sign etc.
>How-To-Repeat:
>Fix:

This may well be overkill, and I am no authority, but "it works for me".
There may of course be a simpler way I don't know about...

*** src/sys/dev/pckbc/wskbdmap_mfii.c.orig	Tue Jan  5 18:37:15 1999
--- src/sys/dev/pckbc/wskbdmap_mfii.c	Tue Jan  5 18:47:16 1999
***************
*** 276,281 ****
--- 276,302 ----
      KC(184), KS_Mode_switch,	KS_Multi_key,
  };
  
+ static const keysym_t pckbd_keydesc_uk[] = {
+ /*  pos      normal             shifted         altgr           shift-altgr */
+     KC(2),   KS_1,              KS_exclam,      KS_plusminus,   KS_exclamdown,
+     KC(3),   KS_2,              KS_quotedbl,    KS_twosuperior, KS_cent,
+     KC(4),   KS_3,              KS_sterling,    KS_threesuperior,
+     KC(5),   KS_4,              KS_dollar,      KS_acute,       KS_currency,
+     KC(6),   KS_5,              KS_percent,     KS_mu,          KS_yen,
+     KC(7),   KS_6,              KS_asciicircum, KS_paragraph,
+     KC(8),   KS_7,              KS_ampersand,   KS_periodcentered,KS_brokenbar,
+     KC(9),   KS_8,              KS_asterisk,    KS_cedilla,     KS_ordfeminine,
+     KC(10),  KS_9,              KS_parenleft,   KS_onesuperior, KS_diaeresis,
+     KC(11),  KS_0,              KS_parenright,  KS_masculine,   KS_copyright,
+     KC(12),  KS_minus,          KS_underscore,  KS_hyphen,      KS_ssharp,
+     KC(13),  KS_equal,          KS_plus,        KS_onehalf,     KS_guillemotleft
+ ,
+     KC(40),  KS_apostrophe,     KS_at,          KS_section,     KS_Agrave,
+     KC(41),  KS_grave,          KS_grave,       KS_agrave,      KS_agrave,
+     KC(43),  KS_numbersign,     KS_asciitilde,  KS_sterling,    KS_thorn,
+     KC(86),  KS_backslash,      KS_bar,         KS_Udiaeresis,
+ };
+ 
  static const keysym_t pckbd_keydesc_us_declk[] = {
  /*  pos      normal		shifted		altgr		shift-altgr */
      KC(1),	KS_grave,	KS_asciitilde, /* replace escape */
***************
*** 326,331 ****
--- 347,353 ----
  	KBD_MAP(KB_DK,			KB_US,	pckbd_keydesc_dk),
  	KBD_MAP(KB_DK | KB_NODEAD,	KB_DK,	pckbd_keydesc_dk_nodead),
  	KBD_MAP(KB_IT,			KB_US,	pckbd_keydesc_it),
+         KBD_MAP(KB_UK,                  KB_US,  pckbd_keydesc_uk),
  	KBD_MAP(KB_US | KB_DECLK,	KB_US,	pckbd_keydesc_us_declk),
  	{0, 0, 0, 0}
  };
*** src/sys/dev/wscons/wsksymdef.h.orig	Tue Jan  5 18:44:12 1999
--- src/sys/dev/wscons/wsksymdef.h	Tue Jan  5 18:44:55 1999
***************
*** 452,457 ****
--- 452,458 ----
  #define KB_DK			0x0400
  #define KB_IT			0x0500
  #define KB_FR                   0x0600
+ #define KB_UK                   0x0700
  
  #define KB_NODEAD		0x0001
  #define KB_DECLK		0x0002	/* DEC LKnnn layout */
***************
*** 464,469 ****
--- 465,471 ----
  	{ KB_DK,	"dk" }, \
  	{ KB_IT,	"it" }, \
  	{ KB_FR,	"fr" }, \
+ 	{ KB_UK,	"uk" }, \
  	{ KB_NODEAD,	"nodead" }, \
  	{ KB_DECLK,	"declk" }, \
  	{ KB_LK401,	"lk401" }



==============================================================================

The following file doesn't seem to be used, but it is referred to in the
NWSCONS configuration file as the place for this sort of thing. It is also the
file that gets copied to /usr/include. This makes me wonder about the French
keyboard mapping, as it appears in pckbc/wskbdmap_mfii.c, but not in
wscons/wskbdmap_mfii.h, so how does for instance wsconsctl find out about it?

*** src/sys/dev/wscons/wskbdmap_mfii.h.orig	Tue Jan  5 17:25:02 1999
--- src/sys/dev/wscons/wskbdmap_mfii.h	Tue Jan  5 18:46:27 1999
***************
*** 239,244 ****
--- 239,264 ----
      KC(184), KS_Mode_switch,	KS_Multi_key,
  };
  
+ static const keysym_t pckbd_keydesc_uk[] = {
+ /*  pos      normal		shifted		altgr		shift-altgr */
+     KC(2),   KS_1,		KS_exclam,	KS_plusminus,	KS_exclamdown,
+     KC(3),   KS_2,		KS_quotedbl,	KS_twosuperior,	KS_cent,
+     KC(4),   KS_3,		KS_sterling,	KS_threesuperior,
+     KC(5),   KS_4,		KS_dollar,	KS_acute,	KS_currency,
+     KC(6),   KS_5,	    	KS_percent,	KS_mu,		KS_yen,
+     KC(7),   KS_6,		KS_asciicircum,	KS_paragraph,
+     KC(8),   KS_7,	    	KS_ampersand,	KS_periodcentered,KS_brokenbar,
+     KC(9),   KS_8,	    	KS_asterisk,	KS_cedilla,	KS_ordfeminine,
+     KC(10),  KS_9,	    	KS_parenleft,	KS_onesuperior,	KS_diaeresis,
+     KC(11),  KS_0,	    	KS_parenright,	KS_masculine,	KS_copyright,
+     KC(12),  KS_minus,		KS_underscore,	KS_hyphen,	KS_ssharp,
+     KC(13),  KS_equal, 		KS_plus,	KS_onehalf,	KS_guillemotleft,
+     KC(40),  KS_apostrophe,	KS_at,		KS_section,	KS_Agrave,
+     KC(41),  KS_grave,		KS_grave,	KS_agrave,	KS_agrave,
+     KC(43),  KS_numbersign,	KS_asciitilde,	KS_sterling,	KS_thorn,
+     KC(86),  KS_backslash,	KS_bar,		KS_Udiaeresis,
+ };
+ 
  static const keysym_t pckbd_keydesc_us_declk[] = {
  /*  pos      normal		shifted		altgr		shift-altgr */
      KC(1),	KS_grave,	KS_asciitilde, /* replace escape */
***************
*** 288,293 ****
--- 308,314 ----
  	KBD_MAP(KB_DK | KB_NODEAD,	KB_DK,	pckbd_keydesc_dk_nodead),
  	KBD_MAP(KB_IT,			KB_US,	pckbd_keydesc_it),
  	KBD_MAP(KB_US | KB_DECLK,	KB_US,	pckbd_keydesc_us_declk),
+ 	KBD_MAP(KB_UK,			KB_US,	pckbd_keydesc_uk),
  	{0, 0, 0, 0}
  };
  
==============================================================================

.. and an irrelevant observation, but in wscons/wsksymdef.h, why have
KS_ordfeminine, but KS_masculine as opposed to KS_ordmasculine ?
>Audit-Trail:
>Unformatted: