#ifdef __APPLE__
+#define APPLE_VK_ANSI_A 0x00
+#define APPLE_VK_ANSI_S 0x01
+#define APPLE_VK_ANSI_D 0x02
+#define APPLE_VK_ANSI_F 0x03
+#define APPLE_VK_ANSI_H 0x04
+#define APPLE_VK_ANSI_G 0x05
+#define APPLE_VK_ANSI_Z 0x06
+#define APPLE_VK_ANSI_X 0x07
+#define APPLE_VK_ANSI_C 0x08
+#define APPLE_VK_ANSI_V 0x09
+#define APPLE_VK_ANSI_B 0x0B
+#define APPLE_VK_ANSI_Q 0x0C
+#define APPLE_VK_ANSI_W 0x0D
+#define APPLE_VK_ANSI_E 0x0E
+#define APPLE_VK_ANSI_R 0x0F
+#define APPLE_VK_ANSI_Y 0x10
+#define APPLE_VK_ANSI_T 0x11
+#define APPLE_VK_ANSI_1 0x12
+#define APPLE_VK_ANSI_2 0x13
+#define APPLE_VK_ANSI_3 0x14
+#define APPLE_VK_ANSI_4 0x15
+#define APPLE_VK_ANSI_6 0x16
+#define APPLE_VK_ANSI_5 0x17
+#define APPLE_VK_ANSI_Equal 0x18
+#define APPLE_VK_ANSI_9 0x19
+#define APPLE_VK_ANSI_7 0x1A
+#define APPLE_VK_ANSI_Minus 0x1B
+#define APPLE_VK_ANSI_8 0x1C
+#define APPLE_VK_ANSI_0 0x1D
+#define APPLE_VK_ANSI_RightBracket 0x1E
+#define APPLE_VK_ANSI_O 0x1F
+#define APPLE_VK_ANSI_U 0x20
+#define APPLE_VK_ANSI_LeftBracket 0x21
+#define APPLE_VK_ANSI_I 0x22
+#define APPLE_VK_ANSI_P 0x23
+#define APPLE_VK_ANSI_L 0x25
+#define APPLE_VK_ANSI_J 0x26
+#define APPLE_VK_ANSI_Quote 0x27
+#define APPLE_VK_ANSI_K 0x28
+#define APPLE_VK_ANSI_Semicolon 0x29
+#define APPLE_VK_ANSI_Backslash 0x2A
+#define APPLE_VK_ANSI_Comma 0x2B
+#define APPLE_VK_ANSI_Slash 0x2C
+#define APPLE_VK_ANSI_N 0x2D
+#define APPLE_VK_ANSI_M 0x2E
+#define APPLE_VK_ANSI_Period 0x2F
+#define APPLE_VK_ANSI_Grave 0x32
+#define APPLE_VK_ANSI_KeypadDecimal 0x41
+#define APPLE_VK_ANSI_KeypadMultiply 0x43
+#define APPLE_VK_ANSI_KeypadPlus 0x45
+#define APPLE_VK_ANSI_KeypadClear 0x47
+#define APPLE_VK_ANSI_KeypadDivide 0x4B
+#define APPLE_VK_ANSI_KeypadEnter 0x4C
+#define APPLE_VK_ANSI_KeypadMinus 0x4E
+#define APPLE_VK_ANSI_KeypadEquals 0x51
+#define APPLE_VK_ANSI_Keypad0 0x52
+#define APPLE_VK_ANSI_Keypad1 0x53
+#define APPLE_VK_ANSI_Keypad2 0x54
+#define APPLE_VK_ANSI_Keypad3 0x55
+#define APPLE_VK_ANSI_Keypad4 0x56
+#define APPLE_VK_ANSI_Keypad5 0x57
+#define APPLE_VK_ANSI_Keypad6 0x58
+#define APPLE_VK_ANSI_Keypad7 0x59
+#define APPLE_VK_ANSI_Keypad8 0x5B
+#define APPLE_VK_ANSI_Keypad9 0x5C
+
+#define APPLE_VK_Return 0x24
+#define APPLE_VK_Tab 0x30
+#define APPLE_VK_Space 0x31
+#define APPLE_VK_Delete 0x33
+#define APPLE_VK_Escape 0x35
+#define APPLE_VK_Command 0x37
+#define APPLE_VK_Shift 0x38
+#define APPLE_VK_CapsLock 0x39
+#define APPLE_VK_Option 0x3A
+#define APPLE_VK_Control 0x3B
+#define APPLE_VK_RightShift 0x3C
+#define APPLE_VK_RightOption 0x3D
+#define APPLE_VK_RightControl 0x3E
+#define APPLE_VK_Function 0x3F
+#define APPLE_VK_F17 0x40
+#define APPLE_VK_VolumeUp 0x48
+#define APPLE_VK_VolumeDown 0x49
+#define APPLE_VK_Mute 0x4A
+#define APPLE_VK_F18 0x4F
+#define APPLE_VK_F19 0x50
+#define APPLE_VK_F20 0x5A
+#define APPLE_VK_F5 0x60
+#define APPLE_VK_F6 0x61
+#define APPLE_VK_F7 0x62
+#define APPLE_VK_F3 0x63
+#define APPLE_VK_F8 0x64
+#define APPLE_VK_F9 0x65
+#define APPLE_VK_F11 0x67
+#define APPLE_VK_F13 0x69
+#define APPLE_VK_F16 0x6A
+#define APPLE_VK_F14 0x6B
+#define APPLE_VK_F10 0x6D
+#define APPLE_VK_F12 0x6F
+#define APPLE_VK_F15 0x71
+#define APPLE_VK_Help 0x72
+#define APPLE_VK_Home 0x73
+#define APPLE_VK_PageUp 0x74
+#define APPLE_VK_ForwardDelete 0x75
+#define APPLE_VK_F4 0x76
+#define APPLE_VK_End 0x77
+#define APPLE_VK_F2 0x78
+#define APPLE_VK_PageDown 0x79
+#define APPLE_VK_F1 0x7A
+#define APPLE_VK_LeftArrow 0x7B
+#define APPLE_VK_RightArrow 0x7C
+#define APPLE_VK_DownArrow 0x7D
+#define APPLE_VK_UpArrow 0x7E
+
+#define APPLE_VK_ISO_Section 0x0A
+
+#define APPLE_VK_JIS_Yen 0x5D
+#define APPLE_VK_JIS_Underscore 0x5E
+#define APPLE_VK_JIS_KeypadComma 0x5F
+#define APPLE_VK_JIS_Eisu 0x66
+#define APPLE_VK_JIS_Kana 0x68
+
const DWORD KEYCODE_TO_VKCODE_MACOSX[256] =
{
0, /* 0 */