/* rcsid[] = "$Header: kb.h,v 800.0 85/08/06 14:16:27 root Exp $" */
/* sccsid[] = "%W% %Y% %Q% %G%" */


#define	KBADDR	((struct acia_device *)(IOBASE+0x30F00))
 
	/* simple control chars of interest */
#define FRET	'\r'
#define FLF	'\n'	/* Line Feed */
#define FTAB	'\t'
#define FBS	'\010'	/* back space */
#define FESC	'\033'
#define FDEL	'\177'
 	/* special char codes */
#define FUNCT	0x80	/* function keys are >= than this */
#define F1	0x80
#define F2	0x81
#define F3	0x82
#define F4	0x83
#define F5	0x84
#define F6	0x85
#define F7	0x86
#define F8	0x87
#define F9	0x88
#define F10	0x89
#define F11	0x8a
#define F12	0x8b
#define FBTB	0x8c	/* Back tab */
#define FUP	0x8d
#define FDN	0x8e
#define FLT	0x8f
#define FRT	0x90
#define FHM	0x91
#define FBRK	0x92
#define FZZ	0x93
#define FENT	0x94
#define FEOL	0x95	/* erase end of line -- provisional... */
#define FEOP	0x96	/* erase end of page */
#define FX0	0x97
#define FX1	0x98
#define FX2	0x99
#define FX3	0x9a
#define FX4	0x9b
#define FXX	0x9c
#define INV	0x9d	/* nothing under this key */
#define PAUSE	0x9e	/* PAUSE key */
#define HELP	0x9f	/* HELP key */
/* #define NFUNCT	0x20	/* number of function keys */

#ifdef notdef
#define QUL	0xf0	/* qualifier values are >= than this */
#define SHL	0xf0	/* left shift key */
#define SHR	0xf1	/* right shift key */
#define CTL	0xf2	/* control */
#define CAPS	0xf3	/* shift lock */
#define FAST	0xf4
#define CMD	0xf5
#define ALT	0xf6
#define LCK     0xf7
#endif notdef
/*
 * The "new" codes for qualifiers
 */
#define QUL	0xF0

#define SHL	0xF0	/* left shift */
#define SHR	0xF1	/* right shift */
#define CTL	0xF2	/* control */
#define ALT	0xF3	/* alternate */
#define FAST	0xF4	/* unused */
#define CMD	0xF5	/* unused */
#define LCK	0xF6	/* caps lock */
#define ALCK	0xF7	/* alt lock */

/*
 * Some keys have state.  Explicitly model this.
 */
#define LCK1	LCK
#define LCK2	0xFE
#define ALCK1	ALCK
#define ALCK2	0xFF

#define CAPS	LCK

 /* Key code functions */
 
#define STROKEBIT 0x80	/* This signals coming up or going down... */

/* bit defs from above */
 
#define KBLSHFT (1<<(SHL-QUL))
#define KBRSHFT (1<<(SHR-QUL))
#define KBSHFT (KBLSHFT|KBRSHFT)

#define KBCTL (1 << (CTL-QUL))
#define KBALT (1 << (ALT-QUL))
#define KBFAST (1 << (FAST-QUL))
#define KBCMD (1 << (CMD-QUL))
#define KBLCK (1 << (CAPS-QUL))
#define KBALCK (1<<(ALCK-QUL))
 
#define CTLMASK	0x1F	/* mask for control characters */
 
 	/* things for auto repeat */
#define KBTIME 4	/* repeat interval */
