2 SDL - Simple DirectMedia Layer
3 Copyright (C) 1997-2009 Sam Lantinga
5 This library is free software; you can redistribute it and/or
6 modify it under the terms of the GNU Lesser General Public
7 License as published by the Free Software Foundation; either
8 version 2.1 of the License, or (at your option) any later version.
10 This library is distributed in the hope that it will be useful,
11 but WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 Lesser General Public License for more details.
15 You should have received a copy of the GNU Lesser General Public
16 License along with this library; if not, write to the Free Software
17 Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
22 #include "SDL_config.h"
24 #include "SDL_vglvideo.h"
26 /* Variables and functions exported by SDL_sysevents.c to other parts
27 of the native video subsystem (SDL_sysvideo.c)
29 extern int VGL_initkeymaps(int fd);
30 extern int VGL_initmouse(int fd);
31 extern void VGL_keyboardcallback(int scancode, int pressed);
33 extern void VGL_InitOSKeymap(_THIS);
34 extern void VGL_PumpEvents(_THIS);
37 #define MOUSE_LEFTBUTTON 0x01
38 #define MOUSE_MIDDLEBUTTON 0x02
39 #define MOUSE_RIGHTBUTTON 0x04
42 #define SCANCODE_ESCAPE 1
53 #define SCANCODE_MINUS 12
54 #define SCANCODE_EQUAL 13
55 #define SCANCODE_BACKSPACE 14
56 #define SCANCODE_TAB 15
67 #define SCANCODE_BRACKET_LEFT 26
68 #define SCANCODE_BRACKET_RIGHT 27
69 #define SCANCODE_ENTER 28
70 #define SCANCODE_LEFTCONTROL 29
80 #define SCANCODE_SEMICOLON 39
81 #define SCANCODE_APOSTROPHE 40
82 #define SCANCODE_GRAVE 41
83 #define SCANCODE_LEFTSHIFT 42
84 #define SCANCODE_BACKSLASH 43
92 #define SCANCODE_COMMA 51
93 #define SCANCODE_PERIOD 52
94 #define SCANCODE_SLASH 53
95 #define SCANCODE_RIGHTSHIFT 54
96 #define SCANCODE_KEYPADMULTIPLY 55
97 #define SCANCODE_LEFTALT 56
98 #define SCANCODE_SPACE 57
99 #define SCANCODE_CAPSLOCK 58
100 #define SCANCODE_F1 59
101 #define SCANCODE_F2 60
102 #define SCANCODE_F3 61
103 #define SCANCODE_F4 62
104 #define SCANCODE_F5 63
105 #define SCANCODE_F6 64
106 #define SCANCODE_F7 65
107 #define SCANCODE_F8 66
108 #define SCANCODE_F9 67
109 #define SCANCODE_F10 68
110 #define SCANCODE_NUMLOCK 69
111 #define SCANCODE_SCROLLLOCK 70
112 #define SCANCODE_KEYPAD7 71
113 #define SCANCODE_CURSORUPLEFT 71
114 #define SCANCODE_KEYPAD8 72
115 #define SCANCODE_CURSORUP 72
116 #define SCANCODE_KEYPAD9 73
117 #define SCANCODE_CURSORUPRIGHT 73
118 #define SCANCODE_KEYPADMINUS 74
119 #define SCANCODE_KEYPAD4 75
120 #define SCANCODE_CURSORLEFT 75
121 #define SCANCODE_KEYPAD5 76
122 #define SCANCODE_KEYPAD6 77
123 #define SCANCODE_CURSORRIGHT 77
124 #define SCANCODE_KEYPADPLUS 78
125 #define SCANCODE_KEYPAD1 79
126 #define SCANCODE_CURSORDOWNLEFT 79
127 #define SCANCODE_KEYPAD2 80
128 #define SCANCODE_CURSORDOWN 80
129 #define SCANCODE_KEYPAD3 81
130 #define SCANCODE_CURSORDOWNRIGHT 81
131 #define SCANCODE_KEYPAD0 82
132 #define SCANCODE_KEYPADPERIOD 83
133 #define SCANCODE_LESS 86
134 #define SCANCODE_F11 87
135 #define SCANCODE_F12 88
136 #define SCANCODE_KEYPADENTER 89
137 #define SCANCODE_RIGHTCONTROL 90
138 #define SCANCODE_CONTROL 107
139 #define SCANCODE_KEYPADDIVIDE 91
140 #define SCANCODE_PRINTSCREEN 92
141 #define SCANCODE_RIGHTALT 93
142 #define SCANCODE_BREAK 104 /* Beware: is 119 */
143 #define SCANCODE_BREAK_ALTERNATIVE 104 /* on some keyboards! */
144 #define SCANCODE_HOME 94
145 #define SCANCODE_CURSORBLOCKUP 95 /* Cursor key block */
146 #define SCANCODE_PAGEUP 96
147 #define SCANCODE_CURSORBLOCKLEFT 97 /* Cursor key block */
148 #define SCANCODE_CURSORBLOCKRIGHT 98 /* Cursor key block */
149 #define SCANCODE_END 99
150 #define SCANCODE_CURSORBLOCKDOWN 100 /* Cursor key block */
151 #define SCANCODE_PAGEDOWN 101
152 #define SCANCODE_INSERT 102
153 #define SCANCODE_REMOVE 103
154 #define SCANCODE_RIGHTWIN 106
155 #define SCANCODE_LEFTWIN 105