1 /* $NetBSD: function.h,v 1.4 1998/03/04 13:16:07 christos Exp $ */
4 * Copyright (c) 1988 The Regents of the University of California.
7 * Redistribution and use in source and binary forms, with or without
8 * modification, are permitted provided that the following conditions
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
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
45 undefined
= 0, /* Not yet touched */
47 FCN_NULL
, /* Illegal sequence */
49 FCN_RESET
, /* unlock keyboard */
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 */
63 FCN_MONOCASE
, /* DISPLAY in upper case */
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 */
75 FCN_CURSEL
, /* Cursor select function (and aid) */
76 FCN_TEST
, /* Test function */
78 FCN_EINP
, /* erase input (dangerous) */
93 #if !defined(PURE3274)
95 * Local editing functions
97 FCN_SETTAB
, /* set a column tab */
101 FCN_INDENT
, /* more margin over one col tab */
106 FCN_ERASE
, /* erase last character */
109 FCN_WORDTAB
, /* tab to start of next word */
111 FCN_WORDEND
, /* find next end of word */
112 FCN_FIELDEND
, /* find next end of field */
117 FCN_APLON
, /* start using apl character set */
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
146 unsigned char keynumber
;
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 */