Thursday, March 31, 2005

 

Pal Keyboard Declarations

Pal Keyboard declarations in Pal_keyboard.hcl
/*
* Abstract type of keyboard drivers
*/
typedef struct _PalKeyboard PalKeyboard;

/*
* Keyboard API
*/
extern macro proc PalKeyboardRun (KeyboardPtrPtr,
DataPortHandleCT, ClockRate);
extern macro proc PalKeyboardReset (KeyboardPtr);
extern macro proc PalKeyboardEnable (KeyboardPtr);
extern macro proc PalKeyboardDisable (KeyboardPtr);
extern macro proc PalKeyboardReadScanCode (KeyboardPtr, KeyReleasedPtr,
ScanCodePtr);
extern macro proc PalKeyboardReadASCII (KeyboardPtr, CharPtr);

/*
* Keyboard scancodes
*/
#define PAL_KEY_ESCAPE 0x76
#define PAL_KEY_F1 0x05
#define PAL_KEY_F2 0x06
#define PAL_KEY_F3 0x04
#define PAL_KEY_F4 0x0C
#define PAL_KEY_F5 0x03
#define PAL_KEY_F6 0x0B
#define PAL_KEY_F7 0x83
#define PAL_KEY_F8 0x0A
#define PAL_KEY_F9 0x01
#define PAL_KEY_F10 0x09
#define PAL_KEY_F11 0x78
#define PAL_KEY_F12 0x07
#define PAL_KEY_SCROLL_LOCK 0x7E
#define PAL_KEY_PAUSE 0x77

#define PAL_KEY_OPEN_SINGLE_QUOTE 0x0E
#define PAL_KEY_1 0x16
#define PAL_KEY_2 0x1E
#define PAL_KEY_3 0x26
#define PAL_KEY_4 0x25
#define PAL_KEY_5 0x2E
#define PAL_KEY_6 0x36
#define PAL_KEY_7 0x3D
#define PAL_KEY_8 0x3E
#define PAL_KEY_9 0x46
#define PAL_KEY_0 0x45
#define PAL_KEY_UNDERSCORE 0x4E
#define PAL_KEY_EQUALS 0x55
#define PAL_KEY_BACKSPACE 0x66

#define PAL_KEY_TAB 0x0D
#define PAL_KEY_Q 0x15
#define PAL_KEY_W 0x1D
#define PAL_KEY_E 0x24
#define PAL_KEY_R 0x2D
#define PAL_KEY_T 0x2C
#define PAL_KEY_Y 0x35
#define PAL_KEY_U 0x3C
#define PAL_KEY_I 0x43
#define PAL_KEY_O 0x44
#define PAL_KEY_P 0x4D
#define PAL_KEY_OPEN_BRACKET 0x54
#define PAL_KEY_CLOSE_BRACKET 0x5B

#define PAL_KEY_CAPS_LOCK 0x58
#define PAL_KEY_A 0x1C
#define PAL_KEY_S 0x1B
#define PAL_KEY_D 0x23
#define PAL_KEY_F 0x2B
#define PAL_KEY_G 0x34
#define PAL_KEY_H 0x33
#define PAL_KEY_J 0x3B
#define PAL_KEY_K 0x42
#define PAL_KEY_L 0x4B
#define PAL_KEY_SEMI_COLON 0x4C
#define PAL_KEY_APOSTROPHE 0x52
#define PAL_KEY_HASH 0x5D
#define PAL_KEY_RETURN 0x5A

#define PAL_KEY_LEFT_SHIFT 0x12
#define PAL_KEY_BACKSLASH 0x61
#define PAL_KEY_Z 0x1A
#define PAL_KEY_X 0x22
#define PAL_KEY_C 0x21
#define PAL_KEY_V 0x2A
#define PAL_KEY_B 0x32
#define PAL_KEY_N 0x31
#define PAL_KEY_M 0x3A
#define PAL_KEY_COMMA 0x41
#define PAL_KEY_STOP 0x49
#define PAL_KEY_DIVIDE 0x4A
#define PAL_KEY_RIGHT_SHIFT 0x59

#define PAL_KEY_LEFT_CTRL 0x14
#define PAL_KEY_LEFT_WIN 0x1F
#define PAL_KEY_LEFT_ALT 0x11
#define PAL_KEY_SPACE_BAR 0x29
#define PAL_KEY_RIGHT_ALT 0x11
#define PAL_KEY_RIGHT_WIN 0x27
#define PAL_KEY_MENU 0x2F
#define PAL_KEY_RIGHT_CTRL 0x14

#define PAL_KEY_NUMLOCK 0x77
#define PAL_KEY_NUM_ASTERIX 0x7C
#define PAL_KEY_NUM_MINUS 0x7b
#define PAL_KEY_NUM_PLUS 0x79
#define PAL_KEY_NUM_0 0x70
#define PAL_KEY_NUM_1 0x69
#define PAL_KEY_NUM_2 0x72
#define PAL_KEY_NUM_3 0x7A
#define PAL_KEY_NUM_4 0x6B
#define PAL_KEY_NUM_5 0x73
#define PAL_KEY_NUM_6 0x74
#define PAL_KEY_NUM_7 0x6C
#define PAL_KEY_NUM_8 0x75
#define PAL_KEY_NUM_9 0x7D

/*
* These keys will all have the 0xE0 prefix to their scan codes. This is
* because they are they duplicate some of the functions of the other keys.
* eg. HOME (0xEO6C) is also found on the numeric keypad 7 (0x6C).
*/
#define PAL_KEY_INSERT 0x70
#define PAL_KEY_HOME 0x6C
#define PAL_KEY_PAGE_UP 0x7D
#define PAL_KEY_DELETE 0x71
#define PAL_KEY_END 0x69
#define PAL_KEY_PAGE_DOWN 0x7A
#define PAL_KEY_CURSOR_UP 0x75
#define PAL_KEY_CURSOR_LEFT 0x6B
#define PAL_KEY_CURSOR_DOWN 0x72
#define PAL_KEY_CURSOR_RIGHT 0x74
#define PAL_KEY_NUM_DIV 0x4A

#endif /* __CELOXICA_PAL_KEYBOARD_HCH__ */

Comments: Post a Comment

<< Home

This page is powered by Blogger. Isn't yours?