// =========================================================================
// 
// EE_keyboard.h
// =========================================================================

#ifndef _EE_KEYBOARD_H
#define _EE_KEYBOARD_H


typedef
  struct KeyboardEvents
  {
		ULONG ClosedQBrackets;
		ULONG Apostrophe;
		ULONG Space;
		ULONG ESC;
		ULONG UpArrow;
		ULONG DownArrow;
		ULONG RightArrow;
		ULONG LeftArrow;
		ULONG F1;
		ULONG F2;
		ULONG F3;
		ULONG F4;
		ULONG F5;
		ULONG F6;
		ULONG F7;
		ULONG F8;
		ULONG F9;
		ULONG F10;
		ULONG	LeftShift;
		ULONG LeftAlt;
  } KEYBOARD_EVENTS;

GLOBAL KEYBOARD_EVENTS KeyboardEvents;

BOOL InitKeyboardDevice(VOID);
VOID RemoveKeyboardDevice(VOID);
VOID GetKeyboardEvents(VOID);


// read keyboard matrix macros

#define TEST_KEY(x) (KeyboardMatrix[(x)>>3]&(1L<<((x)&7L)))


// raw key values

#define KEY_CLOSED_QBRACKETS	0x1b
#define KEY_APOSTROPHE				0x2a
#define KEY_SPACE							0x40
#define KEY_ESC								0x45
#define KEY_UP_ARROW					0x4c
#define KEY_DOWN_ARROW				0x4d
#define KEY_RIGHT_ARROW				0x4e
#define KEY_LEFT_ARROW				0x4f
#define KEY_F1								0x50
#define KEY_F2								0x51
#define KEY_F3								0x52
#define KEY_F4								0x53
#define KEY_F5								0x54
#define KEY_F6								0x55
#define KEY_F7								0x56
#define KEY_F8								0x57
#define KEY_F9								0x58
#define KEY_F10								0x59
#define KEY_LEFT_SHIFT				0x60
#define KEY_LEFT_ALT					0x64

#endif
