Sync usage with man page.
[netbsd-mini2440.git] / usr.bin / tn3270 / ctlr / function.h
blobd89cbbdaaee7866f02c21dbd0a6a011cc5294e63
1 /* $NetBSD: function.h,v 1.4 1998/03/04 13:16:07 christos Exp $ */
3 /*-
4 * Copyright (c) 1988 The Regents of the University of California.
5 * All rights reserved.
7 * Redistribution and use in source and binary forms, with or without
8 * modification, are permitted provided that the following conditions
9 * are met:
10 * 1. Redistributions of source code must retain the above copyright
11 * notice, this list of conditions and the following disclaimer.
12 * 2. Redistributions in binary form must reproduce the above copyright
13 * notice, this list of conditions and the following disclaimer in the
14 * documentation and/or other materials provided with the distribution.
15 * 3. Neither the name of the University nor the names of its contributors
16 * may be used to endorse or promote products derived from this software
17 * without specific prior written permission.
19 * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
20 * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
21 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
22 * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
23 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
24 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
25 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
26 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
27 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
28 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
29 * SUCH DAMAGE.
31 * from: @(#)function.h 4.2 (Berkeley) 4/26/91
35 * The following are the various functions which the keyboard can ask
36 * the controller to perform.
38 * Note that this file (the following entries) are scanned by mkhit.c,
39 * and that the format must remain more-or-less consistent
40 * [ \t]*TOKEN
43 enum ctlrfcn {
45 undefined = 0, /* Not yet touched */
47 FCN_NULL, /* Illegal sequence */
49 FCN_RESET, /* unlock keyboard */
50 FCN_MAKE_SHIFT_LOCK,
51 FCN_BREAK_SHIFT_LOCK,
53 FCN_MAKE_SHIFT, /* shift key pressed DOWN */
54 FCN_BREAK_SHIFT, /* shift key released */
56 FCN_MAKE_ALT, /* alt key pressed DOWN */
57 FCN_BREAK_ALT, /* alt key released */
59 FCN_MAKE_CTRL,
61 FCN_CAPS_LOCK,
63 FCN_MONOCASE, /* DISPLAY in upper case */
64 FCN_DVCNL,
66 FCN_CHARACTER, /* Not one of the following, but ... */
67 FCN_VERTICAL_BAR, /* EBCDIC solid vertical bar */
68 FCN_CENTSIGN, /* EBCDIC cent sign */
69 FCN_SPACE, /* EBCDIC space */
70 FCN_DP, /* EBCDIC dup character */
71 FCN_FM, /* EBCDIC field mark */
73 FCN_AID, /* Some AID key */
74 FCN_ATTN,
75 FCN_CURSEL, /* Cursor select function (and aid) */
76 FCN_TEST, /* Test function */
78 FCN_EINP, /* erase input (dangerous) */
79 FCN_EEOF,
80 FCN_DELETE,
81 FCN_INSRT,
82 FCN_TAB,
83 FCN_BTAB,
84 FCN_NL,
85 FCN_HOME,
86 FCN_UP,
87 FCN_DOWN,
88 FCN_RIGHT,
89 FCN_LEFT,
90 FCN_LEFT2,
91 FCN_RIGHT2,
93 #if !defined(PURE3274)
95 * Local editing functions
97 FCN_SETTAB, /* set a column tab */
98 FCN_DELTAB,
99 FCN_COLTAB,
100 FCN_COLBAK,
101 FCN_INDENT, /* more margin over one col tab */
102 FCN_UNDENT,
103 FCN_SETMRG,
104 FCN_SETHOM,
105 FCN_CLRTAB,
106 FCN_ERASE, /* erase last character */
107 FCN_WERASE,
108 FCN_FERASE,
109 FCN_WORDTAB, /* tab to start of next word */
110 FCN_WORDBACKTAB,
111 FCN_WORDEND, /* find next end of word */
112 FCN_FIELDEND, /* find next end of field */
115 * APL functions
117 FCN_APLON, /* start using apl character set */
118 FCN_APLOFF,
119 FCN_APLEND,
121 FCN_PCON,
122 FCN_PCOFF,
123 FCN_INIT, /* re-init screen */
124 FCN_SYNCH, /* synch up after line/control error */
125 FCN_FLINP, /* flush input buffer */
126 FCN_RESHOW, /* redraw screen */
127 FCN_MASTER_RESET, /* FLINP, RESET, RESHOW, + more */
129 FCN_DISC, /* suspend application */
130 FCN_ESCAPE, /* enter command mode */
132 FCN_ALTK, /* Dvorak keyboard */
134 FCN_XOFF, /* suspend output to screen */
135 FCN_XON, /* resume output to screen */
137 FCN_LPRT /* print screen on printer */
138 #endif /* !defined(PURE3274) */
141 * The following is the structure which defines what a 3270 keystroke
142 * can do.
145 struct hits {
146 unsigned char keynumber;
147 struct hit {
148 enum ctlrfcn ctlrfcn;
149 unsigned char code; /* AID value or 3270 display code */
150 } hit[4]; /* plain, shifted, alted, shiftalted */
153 extern struct hits hits[];
156 * Definitions of the shift state (and the left/right shift key position).
159 #define SHIFT_RIGHT 0x20 /* Right shift key is down */
160 #define SHIFT_LEFT 0x10 /* Left shift key is down */
161 #define SHIFT_CONTROL 0x08 /* Control shift state (unused) */
162 #define SHIFT_ALT 0x04 /* ALT shift state */
163 #define SHIFT_CAPS 0x02 /* Caps lock state */
164 #define SHIFT_UPSHIFT 0x01 /* Upshift state */