#define UNPRESSED 128
#define PRESSED 0
#define KEY_ENTRIES 256
#define INTR 0x9

#define FIRST_DEFAULT 250 	// repeat start time
#define NEXT_DEFAULT 75   	// repeat time (if number of keys > 1)

BYTE oldkey;
WORD first_repeat = FIRST_DEFAULT;
WORD next_repeat = NEXT_DEFAULT;
BYTE same;

_go32_dpmi_registers regs;
_go32_dpmi_seginfo info;
_go32_dpmi_seginfo old_vector;
_go32_dpmi_seginfo pmode_old_handler, pmode_new_handler;

BYTE inb;
BYTE more;
BYTE keytable[KEY_ENTRIES];

// hopefully nobody has more than 256 keyboard keys :)
#define MAXKEYS 256
char *keynames[MAXKEYS];
int xkey_slot = 0;

BYTE oldkb;