130021Sminshall /* 2*33816Sbostic * Copyright (c) 1988 Regents of the University of California. 3*33816Sbostic * All rights reserved. 4*33816Sbostic * 5*33816Sbostic * Redistribution and use in source and binary forms are permitted 6*33816Sbostic * provided that this notice is preserved and that due credit is given 7*33816Sbostic * to the University of California at Berkeley. The name of the University 8*33816Sbostic * may not be used to endorse or promote products derived from this 9*33816Sbostic * software without specific prior written permission. This software 10*33816Sbostic * is provided ``as is'' without express or implied warranty. 11*33816Sbostic * 12*33816Sbostic * @(#)function.h 3.2 (Berkeley) 03/28/88 13*33816Sbostic */ 14*33816Sbostic 15*33816Sbostic /* 1630076Sminshall * The following are the various functions which the keyboard can ask 1730076Sminshall * the controller to perform. 1830076Sminshall * 1930076Sminshall * Note that this file (the following entries) are scanned by mkhit.c, 2030076Sminshall * and that the format must remain more-or-less consistent 2130076Sminshall * [ \t]*TOKEN 2230076Sminshall */ 2330076Sminshall 2430076Sminshall enum ctlrfcn { 2530076Sminshall 2630076Sminshall undefined = 0, /* Not yet touched */ 2730076Sminshall 2830076Sminshall FCN_NULL, /* Illegal sequence */ 2930076Sminshall 3030076Sminshall FCN_RESET, /* unlock keyboard */ 3130665Sminshall FCN_MAKE_SHIFT_LOCK, 3230665Sminshall FCN_BREAK_SHIFT_LOCK, 3330076Sminshall 3430076Sminshall FCN_MAKE_SHIFT, /* shift key pressed DOWN */ 3530076Sminshall FCN_BREAK_SHIFT, /* shift key released */ 3630076Sminshall 3730076Sminshall FCN_MAKE_ALT, /* alt key pressed DOWN */ 3830076Sminshall FCN_BREAK_ALT, /* alt key released */ 3930076Sminshall 4030076Sminshall FCN_MAKE_CTRL, 4130076Sminshall 4231197Sminshall FCN_CAPS_LOCK, 4331197Sminshall 4430076Sminshall FCN_MONOCASE, /* DISPLAY in upper case */ 4530076Sminshall FCN_DVCNL, 4630076Sminshall 4730076Sminshall FCN_CHARACTER, /* Not one of the following, but ... */ 4830076Sminshall FCN_VERTICAL_BAR, /* EBCDIC solid vertical bar */ 4930076Sminshall FCN_CENTSIGN, /* EBCDIC cent sign */ 5030076Sminshall FCN_SPACE, /* EBCDIC space */ 5130076Sminshall FCN_DP, /* EBCDIC dup character */ 5230076Sminshall FCN_FM, /* EBCDIC field mark */ 5330076Sminshall 5430076Sminshall FCN_AID, /* Some AID key */ 5530076Sminshall FCN_ATTN, 5630076Sminshall FCN_CURSEL, /* Cursor select function (and aid) */ 5730076Sminshall FCN_TEST, /* Test function */ 5830076Sminshall 5930076Sminshall FCN_EINP, /* erase input (dangerous) */ 6030076Sminshall FCN_EEOF, 6130076Sminshall FCN_DELETE, 6230076Sminshall FCN_INSRT, 6330076Sminshall FCN_TAB, 6430076Sminshall FCN_BTAB, 6530076Sminshall FCN_NL, 6630076Sminshall FCN_HOME, 6730076Sminshall FCN_UP, 6830076Sminshall FCN_DOWN, 6930076Sminshall FCN_RIGHT, 7030076Sminshall FCN_LEFT, 7130076Sminshall FCN_LEFT2, 7230076Sminshall FCN_RIGHT2, 7330076Sminshall 7430076Sminshall #if !defined(PURE3274) 7530076Sminshall /* 7630076Sminshall * Local editing functions 7730076Sminshall */ 7830076Sminshall FCN_SETTAB, /* set a column tab */ 7930076Sminshall FCN_DELTAB, 8030076Sminshall FCN_COLTAB, 8130076Sminshall FCN_COLBAK, 8230076Sminshall FCN_INDENT, /* more margin over one col tab */ 8330076Sminshall FCN_UNDENT, 8430076Sminshall FCN_SETMRG, 8530076Sminshall FCN_SETHOM, 8630076Sminshall FCN_CLRTAB, 8730076Sminshall FCN_ERASE, /* erase last character */ 8830076Sminshall FCN_WERASE, 8930076Sminshall FCN_FERASE, 9030076Sminshall FCN_WORDTAB, /* tab to start of next word */ 9130076Sminshall FCN_WORDBACKTAB, 9230076Sminshall FCN_WORDEND, /* find next end of word */ 9330076Sminshall FCN_FIELDEND, /* find next end of field */ 9430076Sminshall 9530076Sminshall /* 9630076Sminshall * APL functions 9730076Sminshall */ 9830076Sminshall FCN_APLON, /* start using apl character set */ 9930076Sminshall FCN_APLOFF, 10030076Sminshall FCN_APLEND, 10130076Sminshall 10230076Sminshall FCN_PCON, 10330076Sminshall FCN_PCOFF, 10430076Sminshall FCN_INIT, /* re-init screen */ 10530076Sminshall FCN_SYNCH, /* synch up after line/control error */ 10630076Sminshall FCN_FLINP, /* flush input buffer */ 10730076Sminshall FCN_RESHOW, /* redraw screen */ 10830076Sminshall FCN_MASTER_RESET, /* FLINP, RESET, RESHOW, + more */ 10930076Sminshall 11030076Sminshall FCN_DISC, /* suspend application */ 11130076Sminshall FCN_ESCAPE, /* enter command mode */ 11230076Sminshall 11330076Sminshall FCN_ALTK, /* Dvorak keyboard */ 11430076Sminshall 11530076Sminshall FCN_XOFF, /* suspend output to screen */ 11630076Sminshall FCN_XON, /* resume output to screen */ 11730076Sminshall 11830076Sminshall FCN_LPRT /* print screen on printer */ 11930076Sminshall #endif /* !defined(PURE3274) */ 12030076Sminshall }; 12130076Sminshall /* 12230021Sminshall * The following is the structure which defines what a 3270 keystroke 12330021Sminshall * can do. 12430021Sminshall */ 12530021Sminshall 12630021Sminshall struct hits { 12730021Sminshall unsigned char keynumber; 12830021Sminshall struct hit { 12930076Sminshall enum ctlrfcn ctlrfcn; 13030076Sminshall unsigned char code; /* AID value or 3270 display code */ 13130021Sminshall } hit[4]; /* plain, shifted, alted, shiftalted */ 13230021Sminshall }; 13330021Sminshall 13430021Sminshall extern struct hits hits[]; 13531197Sminshall 13631197Sminshall /* 13731197Sminshall * Definitions of the shift state (and the left/right shift key position). 13831197Sminshall */ 13931197Sminshall 14031197Sminshall #define SHIFT_RIGHT 0x20 /* Right shift key is down */ 14131197Sminshall #define SHIFT_LEFT 0x10 /* Left shift key is down */ 14231197Sminshall #define SHIFT_CONTROL 0x08 /* Control shift state (unused) */ 14331197Sminshall #define SHIFT_ALT 0x04 /* ALT shift state */ 14431197Sminshall #define SHIFT_CAPS 0x02 /* Caps lock state */ 14531197Sminshall #define SHIFT_UPSHIFT 0x01 /* Upshift state */ 146