/* vt220-auxTr,v 1.2 1994/05/26 21:02:31 me Exp */

/*
 * This file is part of the Emu system.
 *
 * Copyright 1990 by PCS Computer Systeme, GmbH. Munich, West Germany.
 * 
 * Copyright 1994 by Jordan K. Hubbard and Michael W. Elbel
 *
 * Permission is hereby granted, free of charge, to any person obtaining
 * a copy of this software and associated documentation files (the
 * "Software"), to deal in the Software without restriction, including
 * without limitation the rights to use, copy, modify, merge, publish,
 * distribute, sublicense, and/or sell copies of the Software, and to
 * permit persons to whom the Software is furnished to do so, subject to
 * the following conditions:
 * 
 * The above copyright notice and this permission notice shall be included
 * in all copies or substantial portions of the Software.
 * 
 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
 * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
 * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
 * IN NO EVENT SHALL PCS, THE AUTHORS, OR THEIR HOUSEPETS BE LIABLE FOR
 * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
 * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
 * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. SO DON'T SUE US.
 * THANK YOU.
 */

/*
 * Auxilliary keyboard translation definitions for the emu "vt220" terminal.
 *
 * Author: Michael Elbel, Jordan Hubbard and Tom Bagli
 * Date: June 28th, 1990
 * Description: This file contains translations for various different
 *		keyboard settings a vt220 might have.
 *
 * Revision History:
 *
 * vt220-auxTr,v
 * Revision 1.2  1994/05/26  21:02:31  me
 * New copyright
 *
 * Revision 1.1.1.1  1994/05/22  11:22:43  me
 * Initial import into CVS
 *
 */

/* Application Keypad */
*term.vt220-auxTrans-appKeypad:						\
	/* Group 1 */							\
	:<Key>KP_0:	key-input("Op")\n				\
	:<Key>KP_1:	key-input("Oq")\n				\
	:<Key>KP_2:	key-input("Or")\n				\
	:<Key>KP_3:	key-input("Os")\n				\
	:<Key>KP_4:	key-input("Ot")\n				\
	:<Key>KP_5:	key-input("Ou")\n				\
	:<Key>KP_6:	key-input("Ov")\n				\
	:<Key>KP_7:	key-input("Ow")\n				\
	:<Key>KP_8:	key-input("Ox")\n				\
	:<Key>KP_9:	key-input("Oy")\n				\
	/* Group 2 */							\
	:<Key>KP_Decimal: key-input("On")\n				\
	:<Key>KP_Subtract: key-input("Om")\n				\
	:<Key>KP_Separator: key-input("Ol")\n				\
	:<Key>KP_Enter:	key-input("OM")\n				\
	:<Key>KP_F1: key-input("OP")\n				\
	:<Key>KP_F2: key-input("OQ")\n				\
	:<Key>KP_F3: key-input("OR")\n				\
	:<Key>KP_F4: key-input("OS")\n

/* Numeric Keypad */
*term.vt220-auxTrans-numKeypad:						\
	/* Group 1 */							\
	:<Key>KP_0:	key-input("0")\n				\
	:<Key>KP_1:	key-input("1")\n				\
	:<Key>KP_2:	key-input("2")\n				\
	:<Key>KP_3:	key-input("3")\n				\
	:<Key>KP_4:	key-input("4")\n				\
	:<Key>KP_5:	key-input("5")\n				\
	:<Key>KP_6:	key-input("6")\n				\
	:<Key>KP_7:	key-input("7")\n				\
	:<Key>KP_8:	key-input("8")\n				\
	:<Key>KP_9:	key-input("9")\n				\
	/* Group 2 */							\
	:<Key>KP_Decimal: key-input(".")\n				\
	:<Key>KP_Subtract: key-input("-")\n				\
	:<Key>KP_Separator: key-input(",")\n				\
	:<Key>KP_Enter:	key-input("\r")\n				\
	:<Key>KP_F1: key-input("OP")\n				\
	:<Key>KP_F2: key-input("OQ")\n				\
	:<Key>KP_F3: key-input("OR")\n				\
	:<Key>KP_F4: key-input("OS")\n

/* Application Cursor Keys */
*term.vt220-auxTrans-appCKeys:						\
	~Shift <Key>Left:	key-input("OD")\n			\
	~Shift <Key>Right:	key-input("OC")\n			\
	~Shift <Key>Down:	key-input("OB")\n			\
	~Shift <Key>Up:		key-input("OA")\n
	
/* Normal Cursor Keys */
*term.vt220-auxTrans-normCKeys:						\
	~Shift <Key>Left:	key-input("[D")\n			\
	~Shift <Key>Right:	key-input("[C")\n			\
	~Shift <Key>Down:	key-input("[B")\n			\
	~Shift <Key>Up:		key-input("[A")\n

/* Function Keys */
*term.vt220-auxTrans-fkeys:						\
	/* F1 through F5 do not send codes */				\
	:<Key>F6:	key-input("[17~")\n				\
	:<Key>F7:	key-input("[18~")\n				\
	:<Key>F8:	key-input("[19~")\n				\
	:<Key>F9:	key-input("[20~")\n				\
	:<Key>F10:	key-input("[21~")\n				\
	:<Key>F11:	key-input("[23~")\n				\
	:<Key>F12:	key-input("[24~")\n				\
	:<Key>F13:	key-input("[25~")\n				\
	:<Key>F14:	key-input("[26~")\n				\
	:<Key>F15:	key-input("[28~")\n				\
	:<Key>F16:	key-input("[29~")\n				\
	:<Key>F17:	key-input("[31~")\n				\
	:<Key>F18:	key-input("[32~")\n				\
	:<Key>F19:	key-input("[33~")\n				\
	:<Key>F20:	key-input("[34~")\n

/* Misc. Function Keys (the ones above the cursor keys) */
*term.vt220-auxTrans-miscFkeys:						\
	~Shift <Key>Find:	key-input("[1~")\n			\
	~Shift <Key>Insert:	key-input("[2~")\n			\
	~Shift <Key>Cancel:	key-input("[3~")\n			\
	~Shift <Key>Select:	key-input("[4~")\n			\
	~Shift <Key>Prior:	key-input("[5~")\n			\
	~Shift <Key>Next:	key-input("[6~")\n

/*
 * redefine Multi_key to the keysym of the key you're using as Compose Key.
 * This is only necessary if your keyboard doesn't kave a key that 
 * generates Multi_key and you don't want to use xmodmap to make one
 */
/* #define Multi_key Alt_L */

/* Umlaute on braces and so on */
*term.vt220-auxTrans-multiKeys:						  \
  ~Shift Mod1<Key>bracketleft:	call-parser(ROP_INSERT_CHAR, "", A, 228)\n\
  Shift Mod1<Key>bracketleft:	call-parser(ROP_INSERT_CHAR, "", A, 196)\n\
  ~Shift Mod1<Key>bracketright:	call-parser(ROP_INSERT_CHAR, "", A, 252)\n\
  Shift Mod1<Key>bracketright:	call-parser(ROP_INSERT_CHAR, "", A, 220)\n\
  ~Shift Mod1<Key>backslash:	call-parser(ROP_INSERT_CHAR, "", A, 246)\n\
  Shift Mod1<Key>backslash:	call-parser(ROP_INSERT_CHAR, "", A, 214)\n\
  ~Shift Mod1<Key>grave:	call-parser(ROP_INSERT_CHAR, "", A, 223)\n\
  Shift Mod1<Key>grave:		call-parser(ROP_INSERT_CHAR, "", A, 167)\n

/* Compose-Generated Characters */
#define CCHAR(first, second, result) <Key>Multi_key,:<Key>first,:<Key>second:\
	call-parser(ROP_INSERT_CHAR, "", A, result) \n

*term.vt220-auxTrans-composeKeys:					\
CCHAR(quotedbl, space, 34)		CCHAR(space, quotedbl, 34)	\
CCHAR(plus, plus, 35)							\
CCHAR(quoteright, space, 39)		CCHAR(space, quoteright, 39)	\
CCHAR(a, a, 64)				CCHAR(A, A, 64)			\
CCHAR(parenleft, parenleft, 91)						\
CCHAR(slash, slash, 92)			CCHAR(slash, less, 92)		\
CCHAR(less, slash, 92)							\
CCHAR(parenright, parenright, 93)					\
CCHAR(asciicircum, space, 94)		CCHAR(space, asciicircum, 94)	\
CCHAR(parenleft, minus, 123)		CCHAR(minus, parenleft, 123)	\
CCHAR(slash, asciicircum, 124)		CCHAR(asciicircum, slash, 124)	\
CCHAR(parenright, minus, 125)		CCHAR(minus, parenright, 125)	\
CCHAR(asciitilde, space, 126)		CCHAR(space, asciitilde, 126)	\
CCHAR(exclam, exclam, 161)						\
CCHAR(c, slash, 162)			CCHAR(slash, c, 162)		\
CCHAR(C, slash, 162)			CCHAR(slash, C, 162)		\
CCHAR(c, bar, 162)			CCHAR(bar, c, 162)		\
CCHAR(C, bar, 162)			CCHAR(bar, C, 162)		\
CCHAR(l, minus, 163)			CCHAR(minus, l, 163)		\
CCHAR(L, minus, 163)			CCHAR(minus, L, 163)		\
CCHAR(l, equal, 163)			CCHAR(equal, l, 163)		\
CCHAR(L, equal, 163)			CCHAR(equal, L, 163)		\
CCHAR(y, minus, 165)			CCHAR(minus, y, 165)		\
CCHAR(Y, minus, 165)			CCHAR(minus, Y, 165)		\
CCHAR(y, equal, 165)			CCHAR(equal, y, 165)		\
CCHAR(Y, equal, 165)			CCHAR(equal, Y, 165)		\
CCHAR(s, o, 167)			CCHAR(o, s, 167)		\
CCHAR(S, O, 167)			CCHAR(O, S, 167)		\
CCHAR(S, exclam, 167)			CCHAR(exclam, S, 167)		\
CCHAR(s, exclam, 167)			CCHAR(exclam, s, 167)		\
CCHAR(s, 0, 167)			CCHAR(0, s, 167)		\
CCHAR(S, 0, 167)			CCHAR(0, S, 167)		\
CCHAR(x, o, 164)			CCHAR(o, x, 164)		\
CCHAR(X, O, 164)			CCHAR(O, X, 164)		\
CCHAR(x, 0, 164)			CCHAR(0, x, 164)		\
CCHAR(X, 0, 164)			CCHAR(0, X, 164)		\
CCHAR(c, o, 169)			CCHAR(o, c, 169)		\
CCHAR(C, O, 169)			CCHAR(O, C, 169)		\
CCHAR(c, 0, 169)			CCHAR(0, c, 169)		\
CCHAR(C, 0, 169)			CCHAR(0, C, 169)		\
CCHAR(a, underscore, 170)		CCHAR(underscore, a, 170)	\
CCHAR(A, underscore, 170)		CCHAR(underscore, A, 170)	\
CCHAR(less, less, 171)							\
CCHAR(0, asciicircum, 176)		CCHAR(asciicircum, 0, 176)	\
CCHAR(space, asterisk, 176)		CCHAR(asterisk, space, 176)	\
CCHAR(space, o, 176)			CCHAR(o, space, 176)		\
CCHAR(space, O, 176)			CCHAR(O, space, 176)		\
CCHAR(plus, minus, 177)			CCHAR(minus, plus, 177)		\
CCHAR(2, asciicircum, 178)		CCHAR(asciicircum, 2, 178)	\
CCHAR(3, asciicircum, 179)		CCHAR(asciicircum, 3, 179)	\
CCHAR(slash, u, 181)							\
CCHAR(slash, U, 181)							\
CCHAR(p, exclam, 182)			CCHAR(exclam, p, 182)		\
CCHAR(P, exclam, 182)			CCHAR(exclam, P, 182)		\
CCHAR(period, asciicircum, 183)		CCHAR(asciicircum, period, 183)	\
CCHAR(1, asciicircum, 185)		CCHAR(asciicircum, 1, 185)	\
CCHAR(o, underscore, 186)		CCHAR(underscore, o, 186)	\
CCHAR(O, underscore, 186)		CCHAR(underscore, O, 186)	\
CCHAR(greater, greater, 187)						\
CCHAR(1, 4, 188)							\
CCHAR(1, 2, 189)							\
CCHAR(question, question, 191)						\
CCHAR(A, grave, 192)			CCHAR(grave, A, 192)		\
CCHAR(A, quoteright, 193)		CCHAR(quoteright, A, 193)	\
CCHAR(A, asciicircum, 194)		CCHAR(asciicircum, A, 194)	\
CCHAR(A, asciitilde, 195)		CCHAR(asciitilde, A, 195)	\
CCHAR(A, quotedbl, 196)			CCHAR(quotedbl, A, 196)		\
CCHAR(A, asterisk, 197)			CCHAR(asterisk, A, 197)		\
CCHAR(A, E, 198)							\
CCHAR(C, comma, 199)			CCHAR(comma, C, 199)		\
CCHAR(E, grave, 200)			CCHAR(grave, E, 200)		\
CCHAR(E, quoteright, 201)		CCHAR(quoteright, E, 201)	\
CCHAR(E, asciicircum, 202)		CCHAR(asciicircum, E, 202)	\
CCHAR(E, quotedbl, 203)			CCHAR(quotedbl, E, 203)		\
CCHAR(I, grave, 204)			CCHAR(grave, I, 204)		\
CCHAR(I, quoteright, 205)		CCHAR(quoteright, I, 205)	\
CCHAR(I, asciicircum, 206)		CCHAR(asciicircum, I, 206)	\
CCHAR(I, quotedbl, 207)			CCHAR(quotedbl, I, 207)		\
CCHAR(N, asciitilde, 209)		CCHAR(asciitilde, N, 209)	\
CCHAR(O, grave, 210)			CCHAR(grave, O, 210)		\
CCHAR(O, quoteright, 211)		CCHAR(quoteright, O, 211)	\
CCHAR(O, asciicircum, 212)		CCHAR(asciicircum, O, 212)	\
CCHAR(O, asciitilde, 213)		CCHAR(asciitilde, O, 213)	\
CCHAR(O, quotedbl, 214)			CCHAR(quotedbl, O, 214)		\
CCHAR(O, E, 215)							\
CCHAR(U, grave, 217)			CCHAR(grave, U, 217)		\
CCHAR(U, quoteright, 218)		CCHAR(quoteright, U, 218)	\
CCHAR(U, asciicircum, 219)		CCHAR(asciicircum, U, 219)	\
CCHAR(U, quotedbl, 220)			CCHAR(quotedbl, U, 220)		\
CCHAR(Y, quotedbl, 221)			CCHAR(quotedbl, Y, 221)		\
CCHAR(s, s, 223)							\
CCHAR(a, grave, 224)			CCHAR(grave, a, 224)		\
CCHAR(a, quoteright, 225)		CCHAR(quoteright, a, 225)	\
CCHAR(a, asciicircum, 226)		CCHAR(asciicircum, a, 226)	\
CCHAR(a, asciitilde, 227)		CCHAR(asciitilde, a, 227)	\
CCHAR(a, quotedbl, 228)			CCHAR(quotedbl, a, 228)		\
CCHAR(a, asterisk, 229)			CCHAR(asterisk, a, 229)		\
CCHAR(a, e, 230)							\
CCHAR(c, comma, 231)			CCHAR(comma, c, 231)		\
CCHAR(e, grave, 232)			CCHAR(grave, e, 232)		\
CCHAR(e, quoteright, 233)		CCHAR(quoteright, e, 233)	\
CCHAR(e, asciicircum, 234)		CCHAR(asciicircum, e, 234)	\
CCHAR(e, quotedbl, 235)			CCHAR(quotedbl, e, 235)		\
CCHAR(i, grave, 236)			CCHAR(grave, i, 236)		\
CCHAR(i, quoteright, 237)		CCHAR(quoteright, i, 237)	\
CCHAR(i, asciicircum, 238)		CCHAR(asciicircum, i, 238)	\
CCHAR(i, quotedbl, 239)			CCHAR(quotedbl, i, 239)		\
CCHAR(n, asciitilde, 241)		CCHAR(asciitilde, n, 241)	\
CCHAR(o, grave, 242)			CCHAR(grave, o, 242)		\
CCHAR(o, quoteright, 243)		CCHAR(quoteright, o, 243)	\
CCHAR(o, asciicircum, 244)		CCHAR(asciicircum, o, 244)	\
CCHAR(o, asciitilde, 245)		CCHAR(asciitilde, o, 245)	\
CCHAR(o, quotedbl, 246)			CCHAR(quotedbl, o, 246)		\
CCHAR(o, e, 247)							\
CCHAR(o, slash, 248)			CCHAR(slash, o, 248)		\
CCHAR(u, grave, 249)			CCHAR(grave, u, 249)		\
CCHAR(u, quoteright, 250)		CCHAR(quoteright, u, 250)	\
CCHAR(u, asciicircum, 251)		CCHAR(asciicircum, u, 251)	\
CCHAR(u, quotedbl, 252)			CCHAR(quotedbl, u, 252)		\
CCHAR(y, quotedbl, 253)			CCHAR(quotedbl, y, 253)		\
/* The keys used in Compose Sequences (so we get them again)     */	\
/* This is necessary to work around a bug in the X toolkit (boo) */	\
:<Key>A:		key-input()\n	:<Key>C:		key-input()\n\
:<Key>E:		key-input()\n	:<Key>I:		key-input()\n\
:<Key>L:		key-input()\n	:<Key>N:		key-input()\n\
:<Key>O:		key-input()\n	:<Key>P:		key-input()\n\
:<Key>S:		key-input()\n	:<Key>U:		key-input()\n\
:<Key>X:		key-input()\n					     \
:<Key>Y:		key-input()\n	:<Key>a:		key-input()\n\
:<Key>c:		key-input()\n	:<Key>e:		key-input()\n\
:<Key>i:		key-input()\n	:<Key>l:		key-input()\n\
:<Key>n:		key-input()\n	:<Key>o:		key-input()\n\
:<Key>p:		key-input()\n	:<Key>s:		key-input()\n\
:<Key>u:		key-input()\n					     \
:<Key>x:		key-input()\n	:<Key>y:		key-input()\n\
:<Key>0:		key-input()\n	:<Key>1:		key-input()\n\
:<Key>2:		key-input()\n	:<Key>3:		key-input()\n\
:<Key>4:		key-input()\n	:<Key>space:		key-input()\n\
:<Key>plus:		key-input()\n	:<Key>minus:		key-input()\n\
:<Key>parenleft:	key-input()\n	:<Key>parenright:	key-input()\n\
:<Key>slash:		key-input()\n	:<Key>less:		key-input()\n\
:<Key>greater:		key-input()\n	:<Key>equal:		key-input()\n\
:<Key>exclam:		key-input()\n	:<Key>question:		key-input()\n\
:<Key>underscore:	key-input()\n	:<Key>bar:		key-input()\n\
:<Key>asterisk:		key-input()\n	:<Key>period:		key-input()\n\
:<Key>comma:		key-input()\n	:<Key>grave:		key-input()\n\
:<Key>quotedbl:		key-input()\n	:<Key>quoteright:	key-input()\n\
:<Key>asciicircum:	key-input()\n	:<Key>asciitilde:	key-input()\n
