xref: /csrg-svn/usr.bin/tn3270/ctlr/function.h (revision 30076)
130021Sminshall /*
2*30076Sminshall  * The following are the various functions which the keyboard can ask
3*30076Sminshall  * the controller to perform.
4*30076Sminshall  *
5*30076Sminshall  * Note that this file (the following entries) are scanned by mkhit.c,
6*30076Sminshall  * and that the format must remain more-or-less consistent
7*30076Sminshall  * [ \t]*TOKEN
8*30076Sminshall  */
9*30076Sminshall 
10*30076Sminshall enum ctlrfcn {
11*30076Sminshall 
12*30076Sminshall 	undefined = 0,			/* Not yet touched */
13*30076Sminshall 
14*30076Sminshall 	FCN_NULL,	  		/* Illegal sequence */
15*30076Sminshall 
16*30076Sminshall 	FCN_RESET,			/* unlock keyboard */
17*30076Sminshall 	FCN_CAPS_LOCK,
18*30076Sminshall 
19*30076Sminshall 	FCN_MAKE_SHIFT,			/* shift key pressed DOWN */
20*30076Sminshall 	FCN_BREAK_SHIFT,		/* shift key released */
21*30076Sminshall 
22*30076Sminshall 	FCN_MAKE_ALT,			/* alt key pressed DOWN */
23*30076Sminshall 	FCN_BREAK_ALT,			/* alt key released */
24*30076Sminshall 
25*30076Sminshall 	FCN_MAKE_CTRL,
26*30076Sminshall 
27*30076Sminshall 	FCN_MONOCASE,			/* DISPLAY in upper case */
28*30076Sminshall 	FCN_DVCNL,
29*30076Sminshall 
30*30076Sminshall 	FCN_CHARACTER,			/* Not one of the following, but ... */
31*30076Sminshall 	FCN_VERTICAL_BAR,		/* EBCDIC solid vertical bar */
32*30076Sminshall 	FCN_CENTSIGN,			/* EBCDIC cent sign */
33*30076Sminshall 	FCN_SPACE,			/* EBCDIC space */
34*30076Sminshall 	FCN_DP,				/* EBCDIC dup character */
35*30076Sminshall 	FCN_FM,				/* EBCDIC field mark */
36*30076Sminshall 
37*30076Sminshall 	FCN_AID,			/* Some AID key */
38*30076Sminshall 	FCN_ATTN,
39*30076Sminshall 	FCN_CURSEL,			/* Cursor select function (and aid) */
40*30076Sminshall 	FCN_TEST,			/* Test function */
41*30076Sminshall 
42*30076Sminshall 	FCN_EINP,			/* erase input (dangerous) */
43*30076Sminshall 	FCN_EEOF,
44*30076Sminshall 	FCN_DELETE,
45*30076Sminshall 	FCN_INSRT,
46*30076Sminshall 	FCN_TAB,
47*30076Sminshall 	FCN_BTAB,
48*30076Sminshall 	FCN_NL,
49*30076Sminshall 	FCN_HOME,
50*30076Sminshall 	FCN_UP,
51*30076Sminshall 	FCN_DOWN,
52*30076Sminshall 	FCN_RIGHT,
53*30076Sminshall 	FCN_LEFT,
54*30076Sminshall 	FCN_LEFT2,
55*30076Sminshall 	FCN_RIGHT2,
56*30076Sminshall 
57*30076Sminshall #if	!defined(PURE3274)
58*30076Sminshall 	/*
59*30076Sminshall 	 * Local editing functions
60*30076Sminshall 	 */
61*30076Sminshall 	FCN_SETTAB,			/* set a column tab */
62*30076Sminshall 	FCN_DELTAB,
63*30076Sminshall 	FCN_COLTAB,
64*30076Sminshall 	FCN_COLBAK,
65*30076Sminshall 	FCN_INDENT,			/* more margin over one col tab */
66*30076Sminshall 	FCN_UNDENT,
67*30076Sminshall 	FCN_SETMRG,
68*30076Sminshall 	FCN_SETHOM,
69*30076Sminshall 	FCN_CLRTAB,
70*30076Sminshall 	FCN_ERASE,			/* erase last character */
71*30076Sminshall 	FCN_WERASE,
72*30076Sminshall 	FCN_FERASE,
73*30076Sminshall 	FCN_WORDTAB,			/* tab to start of next word */
74*30076Sminshall 	FCN_WORDBACKTAB,
75*30076Sminshall 	FCN_WORDEND,			/* find next end of word */
76*30076Sminshall 	FCN_FIELDEND,			/* find next end of field */
77*30076Sminshall 
78*30076Sminshall 	/*
79*30076Sminshall 	 * APL functions
80*30076Sminshall 	 */
81*30076Sminshall 	FCN_APLON,			/* start using apl character set */
82*30076Sminshall 	FCN_APLOFF,
83*30076Sminshall 	FCN_APLEND,
84*30076Sminshall 
85*30076Sminshall 	FCN_PCON,
86*30076Sminshall 	FCN_PCOFF,
87*30076Sminshall 	FCN_INIT,			/* re-init screen */
88*30076Sminshall 	FCN_SYNCH,			/* synch up after line/control error */
89*30076Sminshall 	FCN_FLINP,			/* flush input buffer */
90*30076Sminshall 	FCN_RESHOW,			/* redraw screen */
91*30076Sminshall 	FCN_MASTER_RESET,		/* FLINP, RESET, RESHOW, + more */
92*30076Sminshall 
93*30076Sminshall 	FCN_DISC,			/* suspend application */
94*30076Sminshall 	FCN_ESCAPE,			/* enter command mode */
95*30076Sminshall 
96*30076Sminshall 	FCN_ALTK,			/* Dvorak keyboard */
97*30076Sminshall 
98*30076Sminshall 	FCN_XOFF,			/* suspend output to screen */
99*30076Sminshall 	FCN_XON,			/* resume output to screen */
100*30076Sminshall 
101*30076Sminshall 	FCN_LPRT			/* print screen on printer */
102*30076Sminshall #endif	/* !defined(PURE3274) */
103*30076Sminshall };
104*30076Sminshall /*
10530021Sminshall  * The following is the structure which defines what a 3270 keystroke
10630021Sminshall  * can do.
10730021Sminshall  */
10830021Sminshall 
10930021Sminshall struct hits {
11030021Sminshall     unsigned char keynumber;
11130021Sminshall     struct hit {
112*30076Sminshall 	enum ctlrfcn ctlrfcn;
113*30076Sminshall 	unsigned char code;	/* AID value or 3270 display code */
11430021Sminshall     } hit[4];	/* plain, shifted, alted, shiftalted */
11530021Sminshall };
11630021Sminshall 
11730021Sminshall extern struct hits hits[];
118