Article Title	 	: SoftPC Keymap files
Creation Date		: 10/13/93
Message ID		: CGLNHQ
Last Update		: 
Expiration Rules	: unknown
=================================================================

SoftPC 3.0 ships with a keymap file for the NCD RT-101 keyboard.
This file is included below.  I have also created a file for 
an NCD-108 keyboard, included below. The NCD-108 file has been
given to two customers so far, and they have not reported problems.

The files go in the directory $SPCHOME/keyboard.

There is also a fax describing how to create the keymap files. 
Its contents is included after the keymap files.

---------------- cut here for file ncd-rt101.kbd  -----------------------
; @(#)ncd_rt101.kbd	1.1 5/1/92 Copyright Insignia Solutions Inc.
1c#1f
76#5a
57#7c
5f#7e
12:5f#7d
64#4c
67#4b
6e#50
6f#55
6d#56
65#51
---------------- cut here for file ncd-n108.kbd  -----------------------
2b#22
2d#14
16#02
2e#06
66#4c
60#54
61#4f
63#53
6a#59
7c#6a
76#5f
5f#64
6e#4b
67#50
64#55
65#4c
6f#51
6d#56

CREATING A NEW KEYMAP FOR SOFTPC:
(Note: This document is written for the SPARC version of SoftPC.  Some of the 
references may be different on your workstation).
SoftPC 3.0 maps all PC/AT keys to equivalent keys available on your workstation 
keyboard.  Some keys such as the separate home, end, page up, page down, and 
arrow keys are not available on some workstation keyboards.  When unavailable, 
these keys are mapped to the key pad as follows:

	---------------------
	| 7    | 8    | 9    |
	| Home | Up   | PgUp |
	---------------------
	| 4    | 5    | 6    |
	| Left |      | Right|
	---------------------
	| 1    | 2    | 3    |
	| End  | Down | PgDn |
	---------------------

If there are PC keys missing from your workstation keyboard or you wish to 
reassign certain keys, you can create a new keymap for SoftPC.  SoftPC 3.0 
comes with 3 key maps:

sun 4c_type4.kbd	(Sun Microsystems Type 4 Keyboard)
sun4_type3.kbd		(Sun Microsystems Type Keyboard)
ncd_rt101.kbd		(NCD Xterminal NCD 101 AT style Keyboard)

In the $SPCHOME/keyboard directory, you can create a new keymap by creating a 
text file with a kbd extension (for example, new.kbd) or edit a copy of one of 
the exisiting keymaps.  This file must be of the following format:

   filename ---\/
	;@(#)sun4c_type4.kbd 1.1 5/1/92 Copyright Insignia Solutions Inc.
	49#0f
	14#3e
	4a#40
	0c#70
	10#7a
	12#7b
	1d#7c
	1e#7d
	1c#7e
	^  ^----SoftPC keyboard hexadecimal keycode
	|
	Workstation keyboard hexadecimal keycode

SoftPC keycodes are listed on the following pages.  The keycodes for your 
workstation keyboard are listed using the following command:  
xmodmap -pk dump
This will give you a listing similar to the following:

	There are 4 key Syms per KeyCode: KeyCodes range from 8 to 132.
		
		KeyCode Keysym	(Keysym)...
		Value 	Value 	(Name)...

		 8	0xffc8 	(F11)
		 9	
		10	0xffc9 	(F12)
		11
		12	0xff6z 	(Help)
		13	0xffbf 	(F2)
		14	0xfc7  	(F10)
		15	0xffc0 	(F3)
		16	0x1000ff10	(SunF36)
		17	0xffc1 	(F4)
		18	0x1000ff11	(SunF37)
		19	0xffc2 	(F5)
		20	0xff7e 	(Mode_switch)
		21	0xffc  	(F6)
		^
		|- Workstation decimal keycode

Please note that this listing consists of decimal numbers which must be 
converted to hexadecimal for use in the keymap file.

For example, the following file new.kbd assigns the Mode_Switch key from the
workstation listing to act as the Right Alt key in the SoftPC emulation:

;@(#)new.kbd 1.1 5/1/92 copyright Insignia Solutions Inc.
14#3E
^  ^--------SoftPC hex keycode for the Right Alt key
|	
|----Workstation hex keycode for the Mode Switch key



SOFTPC KEYCODES (PAGE 1):		

Decimal		(Hex Code)	Keycap
Code
 1		 1		" and '  (I guess this shouldl be ` and ~)
 2		 2		1 and !
 3		 3 		2 and @
 4 		 4		3 and #
 5		 5		4 and $
 6		 6		5 and %
 7		 7		6 and ^
 8		 8		7 and &
 9		 9		8 and *
10		 A		9 and (
11		 B		0 and )
12		 C		- and _
13		 D		= and +
14		 E		
15		 F		Backspace
16		10		Tab
17		11		q
18		12		w
19		13		e
20		14		r
21		15		t
22		16		y
23		17		u
24		18		i		
25		19		o
26		1A		p
27		1B		[ and {
28		1C		] and }
29		1D		\ and |
30		1E		Caps Lock
31		1F		a
32		20		s

Decimal		(Hex Code)	Keycap
Code
33		21		d
34		22		f
35		23		g
36		24		h
37		25		j
38		26		k
39		27		l
40		28		; and :
41		29		' and " 
42		2A
43		2B		Return
44		2C		Left Shift
45		2D		Caps Lock
46		2E		z
47		2F		x
48		30		c
49		31		v
50		32		b
51		33		n
52		34		m
53		35		, and <
54		36		. and >
55		37		/ and ?
56		38		
57		39		Right Shift
58		3A		Left Control
59		3B	
60		3C		Left Alt
61		3D		Space bar
62		3E		Right Alt
63		3F
64		40

SOFTPC KEYCODES (PAGE 2):

Decimal		Hex Code	Keycap
Code
65		41		
66		42
67		43
68		44
69		45
70		46
71		47
72		48
73		49
74		4A
75		4B		Insert
76		4C		Delete
77		40		(document unreadable)
78		4E		
79		4F		Left Arrow
80		50		Home
81		51		End
82		52		
83		53		Up Arrow
84		54		Down Arrow
85		55		Page Up
86		56		Page Down
87		57		
88		58
89		59		Right Arrow
90		5A		Num Lock
91		5B		Num Pad 7
92		5C		Num Pad 4
93		5D		Num Pad 1
94		5E		
95		5F		Num Pad /

Decimal		Hex Code	Keycap
Code
96		60		Num Pad 8
97		61		Num Pad 5
98		62		Num Pad 2
99		63		Num Pad 0
100		64		Num Pad *
101		65		Num Pad 9
102		66		Num Pad 6
103		67		Num Pad 3
104		68		Num Pad .
105		69		Num Pad -
106		6A		Num Pad +
107		6B		
108		6C		Enter
109		6D		
110		6E		Escape
111		6F		
112		70		f1
113		71		f2
114		72		f3
115		73		f4
116		74		f5
117		75		f6
118		76		f7
119		77		f8
120		78		f9
121		79		f10
122		7A		f11
123		7B		f12
124		7C		
125		7D		
126		7E		Pause/Break
