Subject: Swapping CapsLock and Control Keys
To: None <port-i386@NetBSD.ORG>
From: Alistair G. Crooks <agc@uts.amdahl.com>
List: port-i386
Date: 03/02/1995 03:57:35
The following diff swaps the CapsLock and Control keys depending upon
whether you have an "options CAPS_IS_CONTROL" line in your kernel
config file.  I'm told that BSDi do it that way.  On my keyboard, the
LEDs are switched too - the Caps Lock LED lights up whenever the
(logical) Caps Lock key is selected - i.e. the CapsLock LED follows
the logical CapsLock key.  This has advantages over xmodmap-type of
solutions, which illuminate the LED whenever the physical CapsLock key
(to the right of 'A') is pressed, even if you've mapped it to
something else.  Obviously, this only works if you're using pccons.

Cheers,
Alistair
--
Alistair G. Crooks (agc@uts.amdahl.com)			   +44 125 234 6377
Amdahl European HQ, Dogmersfield Park, Hartley Wintney, Hants RG27 8TE, UK.
[These are only my opinions, and certainly not those of Amdahl Corporation]

*** pccons.c	1995/03/02 11:44:45	1.1
--- pccons.c	1995/03/02 11:44:55
***************
*** 1267,1273 ****
--- 1267,1277 ----
  	ASCII,	"[",		"{",		"\033",		/* 26 [ */
  	ASCII,	"]",		"}",		"\035",		/* 27 ] */
  	ASCII,	"\r",		"\r",		"\n",		/* 28 return */
+ #ifdef CAPS_IS_CONTROL
+ 	CAPS,	"",		"",		"",		/* 29 caps */
+ #else
  	CTL,	"",		"",		"",		/* 29 control */
+ #endif
  	ASCII,	"a",		"A",		"\001",		/* 30 a */
  	ASCII,	"s",		"S",		"\023",		/* 31 s */
  	ASCII,	"d",		"D",		"\004",		/* 32 d */
***************
*** 1296,1302 ****
--- 1300,1310 ----
  	KP,	"*",		"*",		"*",		/* 55 kp * */
  	ALT,	"",		"",		"",		/* 56 alt */
  	ASCII,	" ",		" ",		"\000",		/* 57 space */
+ #ifdef CAPS_IS_CONTROL
+ 	CTL,	"",		"",		"",		/* 58 control */
+ #else
  	CAPS,	"",		"",		"",		/* 58 caps */
+ #endif
  	FUNC,	"\033[M",	"\033[Y",	"\033[k",	/* 59 f1 */
  	FUNC,	"\033[N",	"\033[Z",	"\033[l",	/* 60 f2 */
  	FUNC,	"\033[O",	"\033[a",	"\033[m",	/* 61 f3 */