*BSD News Article 6118


Return to BSD News archive

Newsgroups: comp.unix.bsd
From: zawada@softage.demon.co.uk.demon.co.uk (Mark D Simpson)
Path: sserve!manuel!munnari.oz.au!spool.mu.edu!uwm.edu!linac!pacific.mps.ohio-state.edu!cis.ohio-state.edu!zaphod.mps.ohio-state.edu!caen!uunet!pipex!demon!softage.demon.co.uk.demon.co.uk!zawada
Subject: Anyone for a UK keyboard?
Distribution: world
Organization: Softage Solutions
Lines: 249
Date: Wed, 7 Oct 1992 05:54:41 +0000
Message-ID: <718437281snx@softage.demon.co.uk.demon.co.uk>
Sender: usenet@gate.demon.co.uk

Here's a simple patch to enable use of a UK keyboard with correct key
mapping under 386bsd 0.1.  This is a self extracting shell archive. Save
the text after "CUT HERE" to a file called     "ukkeyb.shar", then
type:    "sh ukkeyb.shar"  to extract and read the README.

If I've re-invented the wheel, don't flame me.  :-)

Mark
---------
Mark Simpson  		
SoftAge Solutions.                          (Beware of Gnomes on missions!)

INTERNET:  zawada@softage.demon.co.uk     | JANET:  zawada@uk.co.demon.h8165
    /      MARK_SIMPSON@hicom.lut.ac.uk   |         zawada@uk.co.demon.softage
  \/				          |         MARK_SIMPSON@uk.ac.lut.hicom


--------------------------------CUT HERE---------------------------------------
#! /bin/sh
# This is a shell archive.  Remove anything before this line, then unpack
# it by saving it into a file and typing "sh file".  To overwrite existing
# files, type "sh file -c".  You can also feed this as standard input via
# unshar, or by typing "sh <file", e.g..  If this archive is complete, you
# will see the following message at the end:
#		"End of shell archive."
# Contents:  README ukkeyb.diff
# Wrapped by zawada@softage.demon.co.uk on Tue Oct 6 22:00:01 1992
PATH=/bin:/usr/bin:/usr/ucb ; export PATH
if test -f 'README' -a "${1}" != "-c" ; then 
  echo shar: Will not clobber existing file \"'README'\"
else
echo shar: Extracting \"'README'\" \(1098 characters\)
sed "s/^X//" >'README' <<'END_OF_FILE'
This is a simple "get-it-working" patch to build a kernel which has
roughly the correct mapping for UK keyboards. It maps all the standard
keys (except some of the more obscure ones, due to a lack of documentation,
and time to find the stuff!). The POUND sign is replaced by a hash.
X
INSTALL THIS AT YOUR OWN RISK. i.e. I accept no responsibilty for
any loss or otherwise however caused.
X
You may copy or distribute this freely for non-profit, provided this README
remains with the patch.
X
X
Mark Simpson.
Email:  zawada@softage.demon.co.uk
Date:   6th October 1992.
X
X
INSTALLATION INSTRUCTIONS FOR 0.1 386BSD.
X=========================================
X
1. Install the patch "ukkeyb.diff" to the file /sys/i386/isa/pccons.c
X   patch <ukkeyb.diff 
X
2. Add the following line to your kernel configuration file in /sys/i386/conf
X
options		ENGLISH_KEYB
X
3. Re-configure the kernel:
X   config <MY_SYSTEM_NAME>
X
4. Make the dependencies in /sys/compile/<MY_SYSTEM_NAME>: 
X   make depend
X
5. Then do a make, copy the file 386bsd to a copy of the FIXIT floppy,
X   and install on the hard disk when happy.
X 
END_OF_FILE
if test 1098 -ne `wc -c <'README'`; then
    echo shar: \"'README'\" unpacked with wrong size!
fi
# end of 'README'
fi
if test -f 'ukkeyb.diff' -a "${1}" != "-c" ; then 
  echo shar: Will not clobber existing file \"'ukkeyb.diff'\"
else
echo shar: Extracting \"'ukkeyb.diff'\" \(5893 characters\)
sed "s/^X//" >'ukkeyb.diff' <<'END_OF_FILE'
X*** pccons.c.orig	Wed Aug 19 09:13:34 1992
X--- pccons.c	Tue Oct  6 03:22:39 1992
X***************
X*** 1090,1100 ****
X--- 1090,1235 ----
X  #define	KP		0x0200	/* Keypad keys */
X  #define	NONE		0x0400	/* no function */
X  
X+ #ifdef ENGLISH_KEYB
X  static Scan_def	scan_codes[] =
X  {
X  	NONE,	"",		"",		"",		/* 0 unused */
X  	ASCII,	"\033",		"\033",		"\033",		/* 1 ESCape */
X  	ASCII,	"1",		"!",		"!",		/* 2 1 */
X+ 	ASCII,	"2",		"\"",		"\000",		/* 3 2 */
X+ 	ASCII,	"3",		"#",		"#",		/* 4 3 */
X+ 	ASCII,	"4",		"$",		"$",		/* 5 4 */
X+ 	ASCII,	"5",		"%",		"%",		/* 6 5 */
X+ 	ASCII,	"6",		"^",		"\036",		/* 7 6 */
X+ 	ASCII,	"7",		"&",		"&",		/* 8 7 */
X+ 	ASCII,	"8",		"*",		"\010",		/* 9 8 */
X+ 	ASCII,	"9",		"(",		"(",		/* 10 9 */
X+ 	ASCII,	"0",		")",		")",		/* 11 0 */
X+ 	ASCII,	"-",		"_",		"\037",		/* 12 - */
X+ 	ASCII,	"=",		"+",		"+",		/* 13 = */
X+ 	ASCII,	"\177",		"\177",		"\010",		/* 14 backspace */
X+ 	ASCII,	"\t",		"\177\t",	"\t",		/* 15 tab */
X+ 	ASCII,	"q",		"Q",		"\021",		/* 16 q */
X+ 	ASCII,	"w",		"W",		"\027",		/* 17 w */
X+ 	ASCII,	"e",		"E",		"\005",		/* 18 e */
X+ 	ASCII,	"r",		"R",		"\022",		/* 19 r */
X+ 	ASCII,	"t",		"T",		"\024",		/* 20 t */
X+ 	ASCII,	"y",		"Y",		"\031",		/* 21 y */
X+ 	ASCII,	"u",		"U",		"\025",		/* 22 u */
X+ 	ASCII,	"i",		"I",		"\011",		/* 23 i */
X+ 	ASCII,	"o",		"O",		"\017",		/* 24 o */
X+ 	ASCII,	"p",		"P",		"\020",		/* 25 p */
X+ 	ASCII,	"[",		"{",		"\033",		/* 26 [ */
X+ 	ASCII,	"]",		"}",		"\035",		/* 27 ] */
X+ 	ASCII,	"\r",		"\r",		"\n",		/* 28 return */
X+ 	CTL,	"",		"",		"",		/* 29 control */
X+ 	ASCII,	"a",		"A",		"\001",		/* 30 a */
X+ 	ASCII,	"s",		"S",		"\023",		/* 31 s */
X+ 	ASCII,	"d",		"D",		"\004",		/* 32 d */
X+ 	ASCII,	"f",		"F",		"\006",		/* 33 f */
X+ 	ASCII,	"g",		"G",		"\007",		/* 34 g */
X+ 	ASCII,	"h",		"H",		"\010",		/* 35 h */
X+ 	ASCII,	"j",		"J",		"\n",		/* 36 j */
X+ 	ASCII,	"k",		"K",		"\013",		/* 37 k */
X+ 	ASCII,	"l",		"L",		"\014",		/* 38 l */
X+ 	ASCII,	";",		":",		";",		/* 39 ; */
X+ 	ASCII,	"'",		"\100",		"'",		/* 40 ' */
X+ 	ASCII,  "`",		"|",		"`",		/* 41 ` */
X+ 	SHIFT,	"",		"",		"",		/* 42 shift */
X+ 	ASCII,	"#",		"~",		"\034",		/* 43 # */
X+ 	ASCII,	"z",		"Z",		"\032",		/* 44 z */
X+ 	ASCII,	"x",		"X",		"\030",		/* 45 x */
X+ 	ASCII,	"c",		"C",		"\003",		/* 46 c */
X+ 	ASCII,	"v",		"V",		"\026",		/* 47 v */
X+ 	ASCII,	"b",		"B",		"\002",		/* 48 b */
X+ 	ASCII,	"n",		"N",		"\016",		/* 49 n */
X+ 	ASCII,	"m",		"M",		"\r",		/* 50 m */
X+ 	ASCII,	",",		"<",		"<",		/* 51 , */
X+ 	ASCII,	".",		">",		">",		/* 52 . */
X+ 	ASCII,	"/",		"?",		"\177",		/* 53 / */
X+ 	SHIFT,	"",		"",		"",		/* 54 shift */
X+ 	KP,	"*",		"*",		"*",		/* 55 kp * */
X+ 	ALT,	"",		"",		"",		/* 56 alt */
X+ 	ASCII,	" ",		" ",		" ",		/* 57 space */
X+ 	CAPS,	"",		"",		"",		/* 58 caps */
X+ 	FUNC,	"\033[M",	"\033[Y",	"\033[k",	/* 59 f1 */
X+ 	FUNC,	"\033[N",	"\033[Z",	"\033[l",	/* 60 f2 */
X+ 	FUNC,	"\033[O",	"\033[a",	"\033[m",	/* 61 f3 */
X+ 	FUNC,	"\033[P",	"\033[b",	"\033[n",	/* 62 f4 */
X+ 	FUNC,	"\033[Q",	"\033[c",	"\033[o",	/* 63 f5 */
X+ 	FUNC,	"\033[R",	"\033[d",	"\033[p",	/* 64 f6 */
X+ 	FUNC,	"\033[S",	"\033[e",	"\033[q",	/* 65 f7 */
X+ 	FUNC,	"\033[T",	"\033[f",	"\033[r",	/* 66 f8 */
X+ 	FUNC,	"\033[U",	"\033[g",	"\033[s",	/* 67 f9 */
X+ 	FUNC,	"\033[V",	"\033[h",	"\033[t",	/* 68 f10 */
X+ 	NUM,	"",		"",		"",		/* 69 num lock */
X+ 	SCROLL,	"",		"",		"",		/* 70 scroll lock */
X+ 	KP,	"7",		"\033[H",	"7",		/* 71 kp 7 */
X+ 	KP,	"8",		"\033[A",	"8",		/* 72 kp 8 */
X+ 	KP,	"9",		"\033[I",	"9",		/* 73 kp 9 */
X+ 	KP,	"-",		"-",		"-",		/* 74 kp - */
X+ 	KP,	"4",		"\033[D",	"4",		/* 75 kp 4 */
X+ 	KP,	"5",		"\033[E",	"5",		/* 76 kp 5 */
X+ 	KP,	"6",		"\033[C",	"6",		/* 77 kp 6 */
X+ 	KP,	"+",		"+",		"+",		/* 78 kp + */
X+ 	KP,	"1",		"\033[F",	"1",		/* 79 kp 1 */
X+ 	KP,	"2",		"\033[B",	"2",		/* 80 kp 2 */
X+ 	KP,	"3",		"\033[G",	"3",		/* 81 kp 3 */
X+ 	KP,	"0",		"\033[L",	"0",		/* 82 kp 0 */
X+ 	KP,	".",		"\177",		".",		/* 83 kp . */
X+ 	NONE,	"",		"",		"",		/* 84 0 */
X+ 	NONE,	"100",		"",		"",		/* 85 0 */
X+ 	NONE,	"\\",		"|",		"",		/* 86 \ */
X+ 	FUNC,	"\033[W",	"\033[i",	"\033[u",	/* 87 f11 */
X+ 	FUNC,	"\033[X",	"\033[j",	"\033[v",	/* 88 f12 */
X+ 	NONE,	"102",		"",		"",		/* 89 0 */
X+ 	NONE,	"103",		"",		"",		/* 90 0 */
X+ 	NONE,	"",		"",		"",		/* 91 0 */
X+ 	NONE,	"",		"",		"",		/* 92 0 */
X+ 	NONE,	"",		"",		"",		/* 93 0 */
X+ 	NONE,	"",		"",		"",		/* 94 0 */
X+ 	NONE,	"",		"",		"",		/* 95 0 */
X+ 	NONE,	"",		"",		"",		/* 96 0 */
X+ 	NONE,	"",		"",		"",		/* 97 0 */
X+ 	NONE,	"",		"",		"",		/* 98 0 */
X+ 	NONE,	"",		"",		"",		/* 99 0 */
X+ 	NONE,	"",		"",		"",		/* 100 */
X+ 	NONE,	"",		"",		"",		/* 101 */
X+ 	NONE,	"",		"",		"",		/* 102 */
X+ 	NONE,	"",		"",		"",		/* 103 */
X+ 	NONE,	"",		"",		"",		/* 104 */
X+ 	NONE,	"",		"",		"",		/* 105 */
X+ 	NONE,	"",		"",		"",		/* 106 */
X+ 	NONE,	"",		"",		"",		/* 107 */
X+ 	NONE,	"",		"",		"",		/* 108 */
X+ 	NONE,	"",		"",		"",		/* 109 */
X+ 	NONE,	"",		"",		"",		/* 110 */
X+ 	NONE,	"",		"",		"",		/* 111 */
X+ 	NONE,	"",		"",		"",		/* 112 */
X+ 	NONE,	"",		"",		"",		/* 113 */
X+ 	NONE,	"",		"",		"",		/* 114 */
X+ 	NONE,	"",		"",		"",		/* 115 */
X+ 	NONE,	"",		"",		"",		/* 116 */
X+ 	NONE,	"",		"",		"",		/* 117 */
X+ 	NONE,	"",		"",		"",		/* 118 */
X+ 	NONE,	"",		"",		"",		/* 119 */
X+ 	NONE,	"",		"",		"",		/* 120 */
X+ 	NONE,	"",		"",		"",		/* 121 */
X+ 	NONE,	"",		"",		"",		/* 122 */
X+ 	NONE,	"",		"",		"",		/* 123 */
X+ 	NONE,	"",		"",		"",		/* 124 */
X+ 	NONE,	"",		"",		"",		/* 125 */
X+ 	NONE,	"",		"",		"",		/* 126 */
X+ 	NONE,	"",		"",		"",		/* 127 */
X+ };
X+ 
X+ #else
X+ 
X+ static Scan_def	scan_codes[] =
X+ {
X+ 	NONE,	"",		"",		"",		/* 0 unused */
X+ 	ASCII,	"\033",		"\033",		"\033",		/* 1 ESCape */
X+ 	ASCII,	"1",		"!",		"!",		/* 2 1 */
X  	ASCII,	"2",		"@",		"\000",		/* 3 2 */
X  	ASCII,	"3",		"#",		"#",		/* 4 3 */
X  	ASCII,	"4",		"$",		"$",		/* 5 4 */
X***************
X*** 1221,1226 ****
X--- 1356,1362 ----
X  	NONE,	"",		"",		"",		/* 126 */
X  	NONE,	"",		"",		"",		/* 127 */
X  };
X+ #endif /*ENGLISH_KEYB*/
X  
X  
X  
END_OF_FILE
if test 5893 -ne `wc -c <'ukkeyb.diff'`; then
    echo shar: \"'ukkeyb.diff'\" unpacked with wrong size!
fi
# end of 'ukkeyb.diff'
fi
echo shar: End of shell archive.
exit 0