#ifndef __SCAN_H__
#define __SCAN_H__
/* Scan code summary for bioskey() call under DJGPP */

#define SCAN_ALT_KCDE	0	/* !fake! - keycode entered by 'ALT' + numbers */

#define SCAN_ESC		1	/* ESC key */
#define SCAN_F1			59	/* F1 */
#define SCAN_F2			60	/* F2 */
#define SCAN_F3			61	/* F3 */
#define SCAN_F4			62	/* F4 */
#define SCAN_F5			63	/* F5 */
#define SCAN_F6			64	/* F6 */
#define SCAN_F7			65	/* F7 */
#define SCAN_F8			66	/* F8 */
#define SCAN_F9			67	/* F9 */
#define SCAN_F10		68	/* F10 */
#define SCAN_F11		133	/* F11 */
#define SCAN_F12		134	/* F12 */

#define SCAN_BACKQUOTE	41	/* '`' */
#define SCAN_1			2	/* 1 */
#define SCAN_2			3	/* 2 */
#define SCAN_3			4	/* 3 */
#define SCAN_4			5	/* 4 */
#define SCAN_5			6	/* 5 */
#define SCAN_6			7	/* 6 */
#define SCAN_7			8	/* 7 */
#define SCAN_8			9	/* 8 */
#define SCAN_9			10	/* 9 */
#define SCAN_0			11	/* 0 */
#define SCAN_MINUS		12	/* '-' */
#define SCAN_EQUAL		13	/* '=' */
#define SCAN_BACKSLASH	43	/* '\\' */
#define SCAN_BACKSPACE	14	/* '\b' */

#define SCAN_TAB		15	/* '\t' */
#define SCAN_Q			16	/* 'Q' */
#define SCAN_W			17	/* 'W' */
#define SCAN_E			18	/* 'E' */
#define SCAN_R			19	/* 'R' */
#define SCAN_T			20	/* 'T' */
#define SCAN_Y			21	/* 'Y' */
#define SCAN_U			22	/* 'U' */
#define SCAN_I			23	/* 'I' */
#define SCAN_O			24	/* 'O' */
#define SCAN_P			25	/* 'P' */
#define SCAN_LBRACKET	26	/* '[' */
#define SCAN_RBRACKET	27	/* ']' */
#define SCAN_ENTER		28	/* '\n' */

#define SCAN_A			30	/* 'A' */
#define SCAN_S			31	/* 'S' */
#define SCAN_D			32	/* 'D' */
#define SCAN_F			33	/* 'F' */
#define SCAN_G			34	/* 'G' */
#define SCAN_H			35	/* 'H' */
#define SCAN_J			36	/* 'J' */
#define SCAN_K			37	/* 'K' */
#define SCAN_L			38	/* 'L' */
#define SCAN_SEMICOLON	39	/* ';' */
#define SCAN_QUOTE		40	/* '\''*/

#define SCAN_Z			44	/* 'Z' */
#define SCAN_X			45	/* 'X' */
#define SCAN_C			46	/* 'C' */
#define SCAN_V			47	/* 'V' */
#define SCAN_B			48	/* 'B' */
#define SCAN_N			49	/* 'N' */
#define SCAN_M			50	/* 'M' */
#define SCAN_COMMA		51	/* ',' */
#define SCAN_DOT		52	/* '.' */
#define SCAN_SLASH		53	/* '/' */

#define SCAN_SPACE		57	/* ' ' */

/* xx */
#define SCAN_INS		82	/* INS */
#define SCAN_DEL		83	/* DEL */
#define SCAN_HOME		71	/* HOME */
#define SCAN_END		79	/* END */
#define SCAN_PGUP		73	/* PGUP */
#define SCAN_PGDN		81	/* PGDN */

#define SCAN_LEFT		75	/* <- */
#define SCAN_RIGHT		77	/* -> */
#define SCAN_UP			72	/* ^- */
#define SCAN_DOWN		80	/* v- */
/*
* Keys in this (xx) section can be distinguished from keypad's scancodes by
* 'ascii' code comparsion ... these keys ALWAYS returns 224 (0xe0)
*/

/* /xx */

/* keypad */
#define SCAN_PAD_SLASH	224	/* '/' */
#define SCAN_PAD_STAR	55	/* '*' */
#define SCAN_PAD_MINUS	74	/* '-' */
#define SCAN_PAD_PLUS	78	/* '+' */
/*							+NUMLOCK / -NUMLOCK */
#define SCAN_PAD_1		79	/* '1' / END */
#define SCAN_PAD_2		80	/* '2' / DOWN */
#define SCAN_PAD_3		81	/* '3' / PGDN */
#define SCAN_PAD_4		75	/* '4' / LEFT */
#define SCAN_PAD_5		76	/* '5' */
#define SCAN_PAD_6		77	/* '6' / RIGHT */
#define SCAN_PAD_7		71	/* '7' / HOME */
#define SCAN_PAD_8		72	/* '8' / UP */
#define SCAN_PAD_9		73	/* '9' / PGUP */
#define SCAN_PAD_0		82	/* '0' / INS */
#define SCAN_PAD_DOT	83	/* '.' / DEL */
#define SCAN_PAD_ENTER	224	/* '\n' */
/*
* These codes returns real ascii value except for PAD_[0-9],PAD_DOT
* If numlock == 1 PAD_[0-9],PAD_DOT returns ascii val, else 0.
*
* PAD_SLASH and PAD_ENTER are distringuished by their ascii code too.
*/

/* /keypad */

/* ^^ That was generated by per-key keycode analysis ... */

/* Following keycodes will be never reported by bioskey() but they exists: */
#if 0
/* remove '(NEVER)' to incorporate these codes into keymap ... */
#define SCAN_CTRL		29	/* (NEVER) CTRL */
#define SCAN_LSHIFT		42	/* (NEVER) LEFT SHIFT */
#define SCAN_RSHIFT		54	/* (NEVER) RIGHT SHIFT */
#define SCAN_PRTSCR		55	/* (NEVER) PRINT SCREEN */
#define SCAN_ALT		56	/* (NEVER) ALT */
#define SCAN_CAPSLOCK	58	/* (NEVER) CAPS LOCK */
#define SCAN_NUMLOCK	69	/* (NEVER) NUM LOCK */
#define SCAN_SCROLLOCK	70	/* (NEVER) SCROLL LOCK */
#endif

/*
* Following keycodes were found in doc ... I forgot to press mods when
* I was "grabbing" all codes ... God bless docs :)
*/
#define SCAN_SHIFT_F1	84	/* SHIFT + F1 */
#define SCAN_SHIFT_F2	85	/* SHIFT + F2 */
#define SCAN_SHIFT_F3	86	/* SHIFT + F3 */
#define SCAN_SHIFT_F4	87	/* SHIFT + F4 */
#define SCAN_SHIFT_F5	88	/* SHIFT + F5 */
#define SCAN_SHIFT_F6	89	/* SHIFT + F6 */
#define SCAN_SHIFT_F7	90	/* SHIFT + F7 */
#define SCAN_SHIFT_F8	91	/* SHIFT + F8 */
#define SCAN_SHIFT_F9	92	/* SHIFT + F9 */
#define SCAN_SHIFT_F10	93	/* SHIFT + F10 */
#define SCAN_SHIFT_F11	135	/* SHIFT + F11 */
#define SCAN_SHIFT_F12	136	/* SHIFT + F12 */

#define SCAN_CTRL_F1	94	/* CTRL + F1 */
#define SCAN_CTRL_F2	95	/* CTRL + F2 */
#define SCAN_CTRL_F3	96	/* CTRL + F3 */
#define SCAN_CTRL_F4	97	/* CTRL + F4 */
#define SCAN_CTRL_F5	98	/* CTRL + F5 */
#define SCAN_CTRL_F6	99	/* CTRL + F6 */
#define SCAN_CTRL_F7	100	/* CTRL + F7 */
#define SCAN_CTRL_F8	101	/* CTRL + F8 */
#define SCAN_CTRL_F9	102	/* CTRL + F9 */
#define SCAN_CTRL_F10	103	/* CTRL + F10 */
#define SCAN_CTRL_F11	137	/* CTRL + F11 */
#define SCAN_CTRL_F12	138	/* CTRL + F12 */

#define SCAN_ALT_F1		104	/* ALT + F1 */
#define SCAN_ALT_F2		105	/* ALT + F2 */
#define SCAN_ALT_F3		106	/* ALT + F3 */
#define SCAN_ALT_F4		107	/* ALT + F4 */
#define SCAN_ALT_F5		108	/* ALT + F5 */
#define SCAN_ALT_F6		109	/* ALT + F6 */
#define SCAN_ALT_F7		110	/* ALT + F7 */
#define SCAN_ALT_F8		111	/* ALT + F8 */
#define SCAN_ALT_F9		112	/* ALT + F9 */
#define SCAN_ALT_F10	113	/* ALT + F10 */
#define SCAN_ALT_F11	139	/* ALT + F11 */
#define SCAN_ALT_F12	140	/* ALT + F12 */

#define SCAN_ALT_A		30	/* ALT + A */
#define SCAN_ALT_B		48	/* ALT + B */
#define SCAN_ALT_C		46	/* ALT + C */
#define SCAN_ALT_D		32	/* ALT + D */
#define SCAN_ALT_E		18	/* ALT + E */
#define SCAN_ALT_F		33	/* ALT + F */
#define SCAN_ALT_G		34	/* ALT + G */
#define SCAN_ALT_H		35	/* ALT + H */
#define SCAN_ALT_I		23	/* ALT + I */
#define SCAN_ALT_J		36	/* ALT + J */
#define SCAN_ALT_K		37	/* ALT + K */
#define SCAN_ALT_L		38	/* ALT + L */
#define SCAN_ALT_M		50	/* ALT + M */
#define SCAN_ALT_N		49	/* ALT + N */
#define SCAN_ALT_O		24	/* ALT + O */
#define SCAN_ALT_P		25	/* ALT + P */
#define SCAN_ALT_Q		16	/* ALT + Q */
#define SCAN_ALT_R		19	/* ALT + R */
#define SCAN_ALT_S		31	/* ALT + S */
#define SCAN_ALT_T		20	/* ALT + T */
#define SCAN_ALT_U		22	/* ALT + U */
#define SCAN_ALT_V		47	/* ALT + V */
#define SCAN_ALT_W		17	/* ALT + W */
#define SCAN_ALT_X		45	/* ALT + X */
#define SCAN_ALT_Y		21	/* ALT + Y */
#define SCAN_ALT_Z		44	/* ALT + Z */
/* Boring, eh? :) */
#define SCAN_ALT_0		129	/* ALT + 0 */
#define SCAN_ALT_1		120	/* ALT + 1 */
#define SCAN_ALT_2		121	/* ALT + 2 */
#define SCAN_ALT_3		122	/* ALT + 3 */
#define SCAN_ALT_4		123	/* ALT + 4 */
#define SCAN_ALT_5		124	/* ALT + 5 */
#define SCAN_ALT_6		125	/* ALT + 6 */
#define SCAN_ALT_7		126	/* ALT + 7 */
#define SCAN_ALT_8		127	/* ALT + 8 */
#define SCAN_ALT_9		128	/* ALT + 9 */
#define SCAN_ALT_MINUS	130	/* ALT + MINUS */
#define SCAN_ALT_EQUAL	131	/* ALT + EQUAL */
#define SCAN_SHIFT_TAB	15	/* SHIFT + TAB */
#define SCAN_CTRL_END	117	/* CTRL + END */
#define SCAN_CTRL_HOME	119	/* CTRL + HOME */
#define SCAN_CTRL_PGUP	132	/* CTRL + PGUP */
#define SCAN_CTRL_PGDN	118	/* CTRL + PGDN */
#define SCAN_CTRL_PRTSCR	114	/* CTRL + PRTSCR */
#define SCAN_CTRL_LEFT	115	/* CTRL + LEFT */
#define SCAN_CTRL_RIGHT	116	/* CTRL + RIGHT */

#define SCAN_ALT_TAB	165	/* ALT + TAB */
#define SCAN_CTRL_TAB	148	/* CTRL + TAB */
#define SCAN_ALT_UP		152	/* ALT + UP */
#define SCAN_ALT_DOWN	160	/* ALT + DOWN */
#define SCAN_ALT_LEFT	155	/* ALT + LEFT */
#define SCAN_ALT_RIGHT	157	/* ALT + RIGHT */
#define SCAN_ALT_DEL	163	/* ALT + DEL */
#define SCAN_ALT_END	159	/* ALT + END */
#define SCAN_ALT_HOME	151	/* ALT + HOME */
#define SCAN_ALT_INS	162	/* ALT + INS */
#define SCAN_ALT_PGUP	153	/* ALT + PGUP */
#define SCAN_ALT_PGDN	161	/* ALT + PGDN */

#define SCAN_ALT_PAD_SLASH	164	/* ALT + '/' */
#define SCAN_ALT_PAD_STAR	55	/* ALT + '*' */
#define SCAN_ALT_PAD_MINUS	74	/* ALT + '-' */
#define SCAN_ALT_PAD_PLUS	78	/* ALT + '+' */
/* ALT + PAD_[0-9] is used for ascii generation, ALT + PAD_DOT is ignored */
#define SCAN_ALT_PAD_ENTER	166	/* ALT + '\n' */

#define SCAN_CTRL_PAD_SLASH	149	/* CTRL + '/' */
#define SCAN_CTRL_PAD_STAR	150	/* CTRL + '*' */
#define SCAN_CTRL_PAD_MINUS	142	/* CTRL + '-' */
#define SCAN_CTRL_PAD_PLUS	144	/* CTRL + '+' */
#define SCAN_CTRL_PAD_1		117	/* CTRL + '1' */
#define SCAN_CTRL_PAD_2		145	/* CTRL + '2' */
#define SCAN_CTRL_PAD_3		118	/* CTRL + '3' */
#define SCAN_CTRL_PAD_4		115	/* CTRL + '4' */
#define SCAN_CTRL_PAD_5		143	/* CTRL + '5' */
#define SCAN_CTRL_PAD_6		116	/* CTRL + '6' */
#define SCAN_CTRL_PAD_7		119	/* CTRL + '7' */
#define SCAN_CTRL_PAD_8		141	/* CTRL + '8' */
#define SCAN_CTRL_PAD_9		132	/* CTRL + '9' */
#define SCAN_CTRL_PAD_0		146	/* CTRL + '0' */
#define SCAN_CTRL_PAD_DOT	147	/* CTRL + '.' */
#define SCAN_CTRL_PAD_ENTER	224	/* CTRL + '\n' */

#endif

/* vim: set ts=4 cindent shiftwidth=4 tw=0 : */
