*
* 5799-WZQ (C) COPYRIGHT IBM CORPORATION 1986,1987
* LICENSED MATERIALS - PROPERTY OF IBM
* REFER TO COPYRIGHT INSTRUCTIONS FORM NUMBER G120-2083
*
* $Header:keyboard_codes_ca 12.0$
* $ACIS:keyboard_codes_ca 12.0$
* $Source: /ibm/acis/usr/src/ibm/RCS/keyboard_codes_ca,v $
* this file is processed by codes.awk into codes.h which is included
* by keyboard.c
* low level meta-functions 
function	FN_IGNORE		ignore this scan code
function	FN_BREAK		break of make-break key
function	FN_SHIFT		shift key
function	FN_CONTROL		control key
function	FN_ALT			alt key
function	FN_NUM_LOCK		num lock key
function	FN_CAPS_LOCK		caps lock key
function	FN_ACTION		action key
* high-level meta-functions
function	FN_DEBUG		go into debugger
function	FN_CLICK		change key click
function	FN_PRINT		print screen
function	FN_LOG			turn on screen logging
function	FN_SCROLL		scroll on/off
function	FN_SWITCH		switch to other screen
function	FN_SWRESET		switch screens (with reset)
function	FN_KILL			kill current program
function	FN_SWAP			swap function of scan codes
function	FN_BEEP			ignore with beep
function	FN_RESET		reset keyboard to standard
function	FN_SET			define from keyboard
* second shift keys
function	FN_SHIFT2		second shift key
function	FN_ALT2			second alt key
* defines for first shift keys
#define	FN_SHIFT1	FN_SHIFT
#define FN_ALT1		FN_ALT
* currently there are 6 code (type) values per scan code
codes	6
* with 2 bytes per entry
codelength	2
#define MAX_CODE_LENGTH	3		/* number of characters per key entry*/
#define MAX_CHAR_LENGTH	2		/* number of characters per key */
#define KBD_STRING_LENGTH	32	/* maximum string length */
#define KBD_STRINGS		100	/* number of kbd strings of max len */
#define META	0x80			/* meta flag */
#define META_STRING	0x40		/* meta string */
#define ISSTRING(p) ((p)&META_STRING)
#define NONE	FN_IGNORE	/* other possible choice is FN_BEEP */
* the default meta key scan codes and their functions
12	meta	FN_SHIFT	shift1
59	meta	FN_SHIFT2	shift2
19	meta	FN_ALT		alt1
39	meta	FN_ALT2		alt2
f0	meta	FN_BREAK	break
14	meta	FN_CAPS_LOCK	caps-lock
11	meta	FN_CONTROL	ctrl
76	meta	FN_NUM_LOCK	num-lock
58	meta	FN_ACTION	action
* type labels - mainly for use by utility program
type	0	""		normal
type	1	"shift-"	shifted
type	2	"caps-lock-"
type	3	"control-"
type	3	"ctl-"
type	3	"ctrl-"
type	3	"cntrl-"
type	3	"clt-"		have pity on poor typists
type	4	"alt-"
type	5	"action-"
* start of character scan codes
* first column is hex code, second is unshifted, next is shifted
* any following columns are comments
* to add another type do
* :.,$s;^I^I;^I{NONE}^I^I;
*code	normal	shift	caps	control  alt	action		name
1c	"a"	"A"	"A"	"\1"	{NONE}	{NONE}		
32	"b"	"B"	"B"	"\2"	{NONE}	{NONE}		
21	"c"	"C"	"C"	"\3"	{NONE}	{NONE}		
23	"d"	"D"	"D"	"\4"	{NONE}	{NONE}		
24	"e"	"E"	"E"	"\5"	{NONE}	{NONE}		
2b	"f"	"F"	"F"	"\6"	{NONE}	{NONE}		
34	"g"	"G"	"G"	"\7"	{NONE}	{NONE}		
33	"h"	"H"	"H"	"\10"	{NONE}	{NONE}		
43	"i"	"I"	"I"	"\11"	{NONE}	{NONE}		
3b	"j"	"J"	"J"	"\12"	{NONE}	{NONE}		
42	"k"	"K"	"K"	"\13"	{NONE}	{NONE}		
4b	"l"	"L"	"L"	"\14"	{NONE}	{NONE}		
3a	"m"	"M"	"M"	"\15"	{NONE}	{NONE}		
31	"n"	"N"	"N"	"\16"	{NONE}	{NONE}		
44	"o"	"O"	"O"	"\17"	{NONE}	{NONE}		
4d	"p"	"P"	"P"	"\20"	{NONE}	{NONE}		
15	"q"	"Q"	"Q"	"\21"	{NONE}	{NONE}		
2d	"r"	"R"	"R"	"\22"	{NONE}	{NONE}		
1b	"s"	"S"	"S"	"\23"	{NONE}	{NONE}		
2c	"t"	"T"	"T"	"\24"	{NONE}	{NONE}		
3c	"u"	"U"	"U"	"\25"	{NONE}	{NONE}		
2a	"v"	"V"	"V"	"\26"	{NONE}	{NONE}		
1d	"w"	"W"	"W"	"\27"	{NONE}	{NONE}		
22	"x"	"X"	"X"	"\30"	{NONE}	{NONE}		
35	"y"	"Y"	"Y"	"\31"	{NONE}	{NONE}		
1a	"z"	"Z"	"Z"	"\32"	{NONE}	{NONE}		
45	"0"	")"	"0"	{NONE}	{NONE}	{NONE}		
16	"1"	"!"	"1"	{NONE}	{NONE}	{NONE}		
1e	"2"	"@"	"2"	"\0"	{NONE}	{NONE}		
26	"3"	"#"	"3"	{NONE}	{NONE}	{NONE}		
25	"4"	"$"	"4"	{NONE}	{NONE}	{NONE}		
2e	"5"	"%"	"5"	{NONE}	{NONE}	{NONE}		
36	"6"	"^"	"6"	"\36"	{NONE}	{NONE}		
3d	"7"	"&"	"7"	{NONE}	{NONE}	{NONE}		
3e	"8"	"*"	"8"	{NONE}	{NONE}	{NONE}		
46	"9"	"("	"9"	{NONE}	{NONE}	{NONE}		
4c	";"	":"	";"	{NONE}	{NONE}	{NONE}		
55	"="	"+"	"="	{NONE}	{NONE}	{NONE}		
54	"["	"{"	"["	"\33"	{NONE}	{NONE}		
52	"'"	"\""	"'""	{NONE}	{NONE}	{NONE}		
41	","	"<"	","	{NONE}	{NONE}	{NONE}		
4e	"-"	"_"	"-"	"\37"	{NONE}	{NONE}		
49	"."	">"	"."	{NONE}	{NONE}	{NONE}		
4a	"/"	"?"	"/"	{NONE}	{NONE}	{NONE}		
* special keys
67	"\0"	"\033\0"	"\0"	{NONE}	{NONE}	{NONE}		insert
64	"\177"	"\177"	"\177"	{NONE}	{NONE}	{NONE}		delete
08	"\33"	"\33"	"\33"	"\33"	{NONE}	{NONE}		esc
29	"\40"	"\40"	"\40"	"\40"	{NONE}	{NONE}		space
63	"\033A"	"\033A"	"\033A"	{NONE}	{NONE}	{NONE}		up-arrow
60	"\033B"	"\033B"	"\033B"	{NONE}	{NONE}	{NONE}		down-arrow
6a	"\033C"	"\033C"	"\033C"	{NONE}	{NONE}	{NONE}		right-arrow
61	"\033D"	"\033D"	"\033D"	{NONE}	{NONE}	{NONE}		left-arrow
6d	"\033E"	"\033e"	"\033E"	{NONE}	{NONE}	{NONE}		page-down
65	"\033F"	"\033f"	"\033F"	{NONE}	{NONE}	{NONE}		end
6f	"\033G"	"\033g"	"\033G"	{NONE}	{NONE}	{NONE}		page-up
6e	"\033H"	"\033h"	"\033H"	{NONE}	{NONE}	{NONE}		home
* pf keys
07	"\033S"	"\033I"	"\033S"	{NONE}	{NONE}	{NONE}		f1
0f	"\033T"	"\033J"	"\033T"	{NONE}	{NONE}	{NONE}		f2
17	"\033U"	"\033K"	"\033U"	{NONE}	{NONE}	{NONE}		f3
1f	"\033V"	"\033L"	"\033V"	{NONE}	{NONE}	{NONE}		f4
27	"\033W"	"\033M"	"\033W"	{NONE}	{NONE}	{NONE}		f5
2f	"\033P"	"\033N"	"\033P"	{NONE}	{NONE}	{NONE}		f6
37	"\033Q"	"\033O"	"\033Q"	{NONE}	{NONE}	{NONE}		f7
3f	"\033R"	"\033X"	"\033R"	{NONE}	{NONE}	{NONE}		f8
47	"\033Y"	"\033-"	"\033Y"	{NONE}	{NONE}	{NONE}		f9
4f	"\033<"	"\033>"	"\033<"	{NONE}	{NONE}	{NONE}		f10
56	"\033["	"\033]"	"\033["	{NONE}	{NONE}	{NONE}		f11
5e	"\033,"	"\033."	"\033,"	{NONE}	{NONE}	{NONE}		f12
* other codes
5c	"\\"	"|"	"\\"	"\34"	{NONE}	{NONE}		
66	"\b"	"\b"	"\b"	{NONE}	{NONE}	{NONE}		backspace
5a	"\r"	"\r"	"\r"	"\r"	{NONE}	{NONE}		enter
79	"\r"	"\r"	"\r"	"\r"	{NONE}	{NONE}		num-enter
0d	"\t"	"\b"	"\t"	{NONE}	{NONE}	{NONE}		tab
5b	"]"	"}"	"]"	"\35"	{NONE}	{NONE}		
0e	"`"	"~"	"`"	{NONE}	{NONE}	{NONE}		
* numeric pad
70	"0"	"0"	"0"	{NONE}	{NONE}	{NONE}		num-0
69	"1"	"1"	"1"	{NONE}	{NONE}	{NONE}		num-1
72	"2"	"2"	"2"	{NONE}	{NONE}	{NONE}		num-2
7a	"3"	"3"	"3"	{NONE}	{NONE}	{NONE}		num-3
6b	"4"	"4"	"4"	{NONE}	{NONE}	{NONE}		num-4
73	"5"	"5"	"5"	{NONE}	{NONE}	{NONE}		num-5
74	"6"	"6"	"6"	{NONE}	{NONE}	{NONE}		num-6
6c	"7"	"7"	"7"	{NONE}	{NONE}	{NONE}		num-7
75	"8"	"8"	"8"	{NONE}	{NONE}	{NONE}		num-8
7d	"9"	"9"	"9"	{NONE}	{NONE}	{NONE}		num-9
7e	"*"	"*"	"*"	{NONE}	{NONE}	{NONE}		num-*
7c	"+"	"+"	"+"	{NONE}	{NONE}	{NONE}		num-+
84	"-"	"-"	"-"	{NONE}	{NONE}	{NONE}		num--
71	"."	"."	"."	{NONE}	{NONE}	{NONE}		num-.
77	"/"	"/"	"/"	{NONE}	{NONE}	{NONE}		num-/
* keys with meta definitions
5f	{FN_SCROLL} {FN_SWAP} {FN_SCROLL} {FN_SWRESET} {FN_SWITCH} {FN_CLICK}		scroll-lock
62	{FN_DEBUG} {FN_DEBUG} {FN_DEBUG} {NONE} {FN_KILL} {FN_RESET}		pause/break
57	{FN_PRINT} {NONE} {FN_PRINT} {FN_LOG} {NONE} {FN_SET}		print-screen
13	{NONE} {NONE} {NONE} {NONE} {NONE} {NONE}	world-trade-key
53	{NONE} {NONE} {NONE} {NONE} {NONE} {NONE}	world-trade-key
