OLD | NEW |
1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 /* | 5 /* |
6 * Copyright (C) 2006, 2007 Apple Inc. All rights reserved. | 6 * Copyright (C) 2006, 2007 Apple Inc. All rights reserved. |
7 * Copyright (C) 2006 Michael Emmel mike.emmel@gmail.com | 7 * Copyright (C) 2006 Michael Emmel mike.emmel@gmail.com |
8 * Copyright (C) 2007 Holger Hans Peter Freyther | 8 * Copyright (C) 2007 Holger Hans Peter Freyther |
9 * Copyright (C) 2008 Collabora, Ltd. All rights reserved. | 9 * Copyright (C) 2008 Collabora, Ltd. All rights reserved. |
10 * Copyright (C) 2008, 2009 Google Inc. | 10 * Copyright (C) 2008, 2009 Google Inc. |
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
50 return VKEY_NUMPAD0; // (60) Numeric keypad 0 key | 50 return VKEY_NUMPAD0; // (60) Numeric keypad 0 key |
51 case GDK_KP_1: | 51 case GDK_KP_1: |
52 return VKEY_NUMPAD1; // (61) Numeric keypad 1 key | 52 return VKEY_NUMPAD1; // (61) Numeric keypad 1 key |
53 case GDK_KP_2: | 53 case GDK_KP_2: |
54 return VKEY_NUMPAD2; // (62) Numeric keypad 2 key | 54 return VKEY_NUMPAD2; // (62) Numeric keypad 2 key |
55 case GDK_KP_3: | 55 case GDK_KP_3: |
56 return VKEY_NUMPAD3; // (63) Numeric keypad 3 key | 56 return VKEY_NUMPAD3; // (63) Numeric keypad 3 key |
57 case GDK_KP_4: | 57 case GDK_KP_4: |
58 return VKEY_NUMPAD4; // (64) Numeric keypad 4 key | 58 return VKEY_NUMPAD4; // (64) Numeric keypad 4 key |
59 case GDK_KP_5: | 59 case GDK_KP_5: |
60 return VKEY_NUMPAD5; //(65) Numeric keypad 5 key | 60 return VKEY_NUMPAD5; // (65) Numeric keypad 5 key |
61 case GDK_KP_6: | 61 case GDK_KP_6: |
62 return VKEY_NUMPAD6; // (66) Numeric keypad 6 key | 62 return VKEY_NUMPAD6; // (66) Numeric keypad 6 key |
63 case GDK_KP_7: | 63 case GDK_KP_7: |
64 return VKEY_NUMPAD7; // (67) Numeric keypad 7 key | 64 return VKEY_NUMPAD7; // (67) Numeric keypad 7 key |
65 case GDK_KP_8: | 65 case GDK_KP_8: |
66 return VKEY_NUMPAD8; // (68) Numeric keypad 8 key | 66 return VKEY_NUMPAD8; // (68) Numeric keypad 8 key |
67 case GDK_KP_9: | 67 case GDK_KP_9: |
68 return VKEY_NUMPAD9; // (69) Numeric keypad 9 key | 68 return VKEY_NUMPAD9; // (69) Numeric keypad 9 key |
69 case GDK_KP_Multiply: | 69 case GDK_KP_Multiply: |
70 return VKEY_MULTIPLY; // (6A) Multiply key | 70 return VKEY_MULTIPLY; // (6A) Multiply key |
71 case GDK_KP_Add: | 71 case GDK_KP_Add: |
72 return VKEY_ADD; // (6B) Add key | 72 return VKEY_ADD; // (6B) Add key |
73 case GDK_KP_Subtract: | 73 case GDK_KP_Subtract: |
74 return VKEY_SUBTRACT; // (6D) Subtract key | 74 return VKEY_SUBTRACT; // (6D) Subtract key |
75 case GDK_KP_Decimal: | 75 case GDK_KP_Decimal: |
76 return VKEY_DECIMAL; // (6E) Decimal key | 76 return VKEY_DECIMAL; // (6E) Decimal key |
77 case GDK_KP_Divide: | 77 case GDK_KP_Divide: |
78 return VKEY_DIVIDE; // (6F) Divide key | 78 return VKEY_DIVIDE; // (6F) Divide key |
79 | 79 |
80 case GDK_BackSpace: | 80 case GDK_BackSpace: |
81 return VKEY_BACK; // (08) BACKSPACE key | 81 return VKEY_BACK; // (08) BACKSPACE key |
82 case GDK_ISO_Left_Tab: | 82 case GDK_ISO_Left_Tab: |
83 case GDK_3270_BackTab: | 83 case GDK_3270_BackTab: |
84 case GDK_Tab: | 84 case GDK_Tab: |
85 return VKEY_TAB; // (09) TAB key | 85 return VKEY_TAB; // (09) TAB key |
86 case GDK_Clear: | 86 case GDK_Clear: |
87 return VKEY_CLEAR; // (0C) CLEAR key | 87 return VKEY_CLEAR; // (0C) CLEAR key |
88 case GDK_ISO_Enter: | 88 case GDK_ISO_Enter: |
89 case GDK_KP_Enter: | 89 case GDK_KP_Enter: |
90 case GDK_Return: | 90 case GDK_Return: |
91 return VKEY_RETURN; //(0D) Return key | 91 return VKEY_RETURN; // (0D) Return key |
92 case GDK_Shift_L: | 92 case GDK_Shift_L: |
93 case GDK_Shift_R: | 93 case GDK_Shift_R: |
94 return VKEY_SHIFT; // (10) SHIFT key | 94 return VKEY_SHIFT; // (10) SHIFT key |
95 case GDK_Control_L: | 95 case GDK_Control_L: |
96 case GDK_Control_R: | 96 case GDK_Control_R: |
97 return VKEY_CONTROL; // (11) CTRL key | 97 return VKEY_CONTROL; // (11) CTRL key |
98 case GDK_Menu: | 98 case GDK_Menu: |
99 case GDK_Alt_L: | 99 case GDK_Alt_L: |
100 case GDK_Alt_R: | 100 case GDK_Alt_R: |
101 return VKEY_MENU; // (12) ALT key | 101 return VKEY_MENU; // (12) ALT key |
102 | 102 |
103 case GDK_Pause: | 103 case GDK_Pause: |
104 return VKEY_PAUSE; // (13) PAUSE key | 104 return VKEY_PAUSE; // (13) PAUSE key |
105 case GDK_Caps_Lock: | 105 case GDK_Caps_Lock: |
106 return VKEY_CAPITAL; // (14) CAPS LOCK key | 106 return VKEY_CAPITAL; // (14) CAPS LOCK key |
107 case GDK_Kana_Lock: | 107 case GDK_Kana_Lock: |
108 case GDK_Kana_Shift: | 108 case GDK_Kana_Shift: |
109 return VKEY_KANA; // (15) Input Method Editor (IME) Kana mode | 109 return VKEY_KANA; // (15) Input Method Editor (IME) Kana mode |
110 case GDK_Hangul: | 110 case GDK_Hangul: |
111 return VKEY_HANGUL; // VKEY_HANGUL (15) IME Hangul mode | 111 return VKEY_HANGUL; // VKEY_HANGUL (15) IME Hangul mode |
112 // VKEY_JUNJA (17) IME Junja mode | 112 // VKEY_JUNJA (17) IME Junja mode |
113 // VKEY_FINAL (18) IME final mode | 113 // VKEY_FINAL (18) IME final mode |
114 case GDK_Hangul_Hanja: | 114 case GDK_Hangul_Hanja: |
115 return VKEY_HANJA; // (19) IME Hanja mode | 115 return VKEY_HANJA; // (19) IME Hanja mode |
116 case GDK_Kanji: | 116 case GDK_Kanji: |
117 return VKEY_KANJI; // (19) IME Kanji mode | 117 return VKEY_KANJI; // (19) IME Kanji mode |
118 case GDK_Escape: | 118 case GDK_Escape: |
119 return VKEY_ESCAPE; // (1B) ESC key | 119 return VKEY_ESCAPE; // (1B) ESC key |
120 // VKEY_CONVERT (1C) IME convert | 120 // VKEY_CONVERT (1C) IME convert |
121 // VKEY_NONCONVERT (1D) IME nonconvert | 121 // VKEY_NONCONVERT (1D) IME nonconvert |
122 // VKEY_ACCEPT (1E) IME accept | 122 // VKEY_ACCEPT (1E) IME accept |
123 // VKEY_MODECHANGE (1F) IME mode change request | 123 // VKEY_MODECHANGE (1F) IME mode change request |
124 case GDK_space: | 124 case GDK_space: |
125 return VKEY_SPACE; // (20) SPACEBAR | 125 return VKEY_SPACE; // (20) SPACEBAR |
126 case GDK_Page_Up: | 126 case GDK_Page_Up: |
127 return VKEY_PRIOR; // (21) PAGE UP key | 127 return VKEY_PRIOR; // (21) PAGE UP key |
128 case GDK_Page_Down: | 128 case GDK_Page_Down: |
129 return VKEY_NEXT; // (22) PAGE DOWN key | 129 return VKEY_NEXT; // (22) PAGE DOWN key |
130 case GDK_End: | 130 case GDK_End: |
131 return VKEY_END; // (23) END key | 131 return VKEY_END; // (23) END key |
132 case GDK_Home: | 132 case GDK_Home: |
133 return VKEY_HOME; // (24) HOME key | 133 return VKEY_HOME; // (24) HOME key |
134 case GDK_Left: | 134 case GDK_Left: |
135 return VKEY_LEFT; // (25) LEFT ARROW key | 135 return VKEY_LEFT; // (25) LEFT ARROW key |
136 case GDK_Up: | 136 case GDK_Up: |
137 return VKEY_UP; // (26) UP ARROW key | 137 return VKEY_UP; // (26) UP ARROW key |
138 case GDK_Right: | 138 case GDK_Right: |
139 return VKEY_RIGHT; // (27) RIGHT ARROW key | 139 return VKEY_RIGHT; // (27) RIGHT ARROW key |
140 case GDK_Down: | 140 case GDK_Down: |
141 return VKEY_DOWN; // (28) DOWN ARROW key | 141 return VKEY_DOWN; // (28) DOWN ARROW key |
142 case GDK_Select: | 142 case GDK_Select: |
143 return VKEY_SELECT; // (29) SELECT key | 143 return VKEY_SELECT; // (29) SELECT key |
144 case GDK_Print: | 144 case GDK_Print: |
145 return VKEY_PRINT; // (2A) PRINT key | 145 return VKEY_PRINT; // (2A) PRINT key |
146 case GDK_Execute: | 146 case GDK_Execute: |
147 return VKEY_EXECUTE;// (2B) EXECUTE key | 147 return VKEY_EXECUTE; // (2B) EXECUTE key |
148 //dunno on this | 148 // dunno on this |
149 //case GDK_PrintScreen: | 149 // case GDK_PrintScreen: |
150 // return VKEY_SNAPSHOT; // (2C) PRINT SCREEN key | 150 // return VKEY_SNAPSHOT; // (2C) PRINT SCREEN key |
151 case GDK_Insert: | 151 case GDK_Insert: |
152 return VKEY_INSERT; // (2D) INS key | 152 return VKEY_INSERT; // (2D) INS key |
153 case GDK_Delete: | 153 case GDK_Delete: |
154 return VKEY_DELETE; // (2E) DEL key | 154 return VKEY_DELETE; // (2E) DEL key |
155 case GDK_Help: | 155 case GDK_Help: |
156 return VKEY_HELP; // (2F) HELP key | 156 return VKEY_HELP; // (2F) HELP key |
157 case GDK_0: | 157 case GDK_0: |
158 case GDK_parenright: | 158 case GDK_parenright: |
159 return VKEY_0; // (30) 0) key | 159 return VKEY_0; // (30) 0) key |
160 case GDK_1: | 160 case GDK_1: |
161 case GDK_exclam: | 161 case GDK_exclam: |
162 return VKEY_1; // (31) 1 ! key | 162 return VKEY_1; // (31) 1 ! key |
163 case GDK_2: | 163 case GDK_2: |
164 case GDK_at: | 164 case GDK_at: |
165 return VKEY_2; // (32) 2 & key | 165 return VKEY_2; // (32) 2 & key |
166 case GDK_3: | 166 case GDK_3: |
167 case GDK_numbersign: | 167 case GDK_numbersign: |
168 return VKEY_3; //case '3': case '#'; | 168 return VKEY_3; // case '3': case '#'; |
169 case GDK_4: | 169 case GDK_4: |
170 case GDK_dollar: // (34) 4 key '$'; | 170 case GDK_dollar: // (34) 4 key '$'; |
171 return VKEY_4; | 171 return VKEY_4; |
172 case GDK_5: | 172 case GDK_5: |
173 case GDK_percent: | 173 case GDK_percent: |
174 return VKEY_5; // (35) 5 key '%' | 174 return VKEY_5; // (35) 5 key '%' |
175 case GDK_6: | 175 case GDK_6: |
176 case GDK_asciicircum: | 176 case GDK_asciicircum: |
177 return VKEY_6; // (36) 6 key '^' | 177 return VKEY_6; // (36) 6 key '^' |
178 case GDK_7: | 178 case GDK_7: |
179 case GDK_ampersand: | 179 case GDK_ampersand: |
180 return VKEY_7; // (37) 7 key case '&' | 180 return VKEY_7; // (37) 7 key case '&' |
181 case GDK_8: | 181 case GDK_8: |
182 case GDK_asterisk: | 182 case GDK_asterisk: |
183 return VKEY_8; // (38) 8 key '*' | 183 return VKEY_8; // (38) 8 key '*' |
184 case GDK_9: | 184 case GDK_9: |
185 case GDK_parenleft: | 185 case GDK_parenleft: |
186 return VKEY_9; // (39) 9 key '(' | 186 return VKEY_9; // (39) 9 key '(' |
187 case GDK_a: | 187 case GDK_a: |
188 case GDK_A: | 188 case GDK_A: |
189 return VKEY_A; // (41) A key case 'a': case 'A': return 0x41; | 189 return VKEY_A; // (41) A key case 'a': case 'A': return 0x41; |
190 case GDK_b: | 190 case GDK_b: |
191 case GDK_B: | 191 case GDK_B: |
192 return VKEY_B; // (42) B key case 'b': case 'B': return 0x42; | 192 return VKEY_B; // (42) B key case 'b': case 'B': return 0x42; |
193 case GDK_c: | 193 case GDK_c: |
194 case GDK_C: | 194 case GDK_C: |
195 return VKEY_C; // (43) C key case 'c': case 'C': return 0x43; | 195 return VKEY_C; // (43) C key case 'c': case 'C': return 0x43; |
196 case GDK_d: | 196 case GDK_d: |
197 case GDK_D: | 197 case GDK_D: |
198 return VKEY_D; // (44) D key case 'd': case 'D': return 0x44; | 198 return VKEY_D; // (44) D key case 'd': case 'D': return 0x44; |
199 case GDK_e: | 199 case GDK_e: |
200 case GDK_E: | 200 case GDK_E: |
201 return VKEY_E; // (45) E key case 'e': case 'E': return 0x45; | 201 return VKEY_E; // (45) E key case 'e': case 'E': return 0x45; |
202 case GDK_f: | 202 case GDK_f: |
203 case GDK_F: | 203 case GDK_F: |
204 return VKEY_F; // (46) F key case 'f': case 'F': return 0x46; | 204 return VKEY_F; // (46) F key case 'f': case 'F': return 0x46; |
205 case GDK_g: | 205 case GDK_g: |
206 case GDK_G: | 206 case GDK_G: |
207 return VKEY_G; // (47) G key case 'g': case 'G': return 0x47; | 207 return VKEY_G; // (47) G key case 'g': case 'G': return 0x47; |
208 case GDK_h: | 208 case GDK_h: |
209 case GDK_H: | 209 case GDK_H: |
210 return VKEY_H; // (48) H key case 'h': case 'H': return 0x48; | 210 return VKEY_H; // (48) H key case 'h': case 'H': return 0x48; |
211 case GDK_i: | 211 case GDK_i: |
212 case GDK_I: | 212 case GDK_I: |
213 return VKEY_I; // (49) I key case 'i': case 'I': return 0x49; | 213 return VKEY_I; // (49) I key case 'i': case 'I': return 0x49; |
214 case GDK_j: | 214 case GDK_j: |
215 case GDK_J: | 215 case GDK_J: |
216 return VKEY_J; // (4A) J key case 'j': case 'J': return 0x4A; | 216 return VKEY_J; // (4A) J key case 'j': case 'J': return 0x4A; |
217 case GDK_k: | 217 case GDK_k: |
218 case GDK_K: | 218 case GDK_K: |
219 return VKEY_K; // (4B) K key case 'k': case 'K': return 0x4B; | 219 return VKEY_K; // (4B) K key case 'k': case 'K': return 0x4B; |
220 case GDK_l: | 220 case GDK_l: |
221 case GDK_L: | 221 case GDK_L: |
222 return VKEY_L; // (4C) L key case 'l': case 'L': return 0x4C; | 222 return VKEY_L; // (4C) L key case 'l': case 'L': return 0x4C; |
223 case GDK_m: | 223 case GDK_m: |
224 case GDK_M: | 224 case GDK_M: |
225 return VKEY_M; // (4D) M key case 'm': case 'M': return 0x4D; | 225 return VKEY_M; // (4D) M key case 'm': case 'M': return 0x4D; |
226 case GDK_n: | 226 case GDK_n: |
227 case GDK_N: | 227 case GDK_N: |
228 return VKEY_N; // (4E) N key case 'n': case 'N': return 0x4E; | 228 return VKEY_N; // (4E) N key case 'n': case 'N': return 0x4E; |
229 case GDK_o: | 229 case GDK_o: |
230 case GDK_O: | 230 case GDK_O: |
231 return VKEY_O; // (4F) O key case 'o': case 'O': return 0x4F; | 231 return VKEY_O; // (4F) O key case 'o': case 'O': return 0x4F; |
232 case GDK_p: | 232 case GDK_p: |
233 case GDK_P: | 233 case GDK_P: |
234 return VKEY_P; // (50) P key case 'p': case 'P': return 0x50; | 234 return VKEY_P; // (50) P key case 'p': case 'P': return 0x50; |
235 case GDK_q: | 235 case GDK_q: |
236 case GDK_Q: | 236 case GDK_Q: |
237 return VKEY_Q; // (51) Q key case 'q': case 'Q': return 0x51; | 237 return VKEY_Q; // (51) Q key case 'q': case 'Q': return 0x51; |
238 case GDK_r: | 238 case GDK_r: |
239 case GDK_R: | 239 case GDK_R: |
240 return VKEY_R; // (52) R key case 'r': case 'R': return 0x52; | 240 return VKEY_R; // (52) R key case 'r': case 'R': return 0x52; |
241 case GDK_s: | 241 case GDK_s: |
242 case GDK_S: | 242 case GDK_S: |
243 return VKEY_S; // (53) S key case 's': case 'S': return 0x53; | 243 return VKEY_S; // (53) S key case 's': case 'S': return 0x53; |
244 case GDK_t: | 244 case GDK_t: |
245 case GDK_T: | 245 case GDK_T: |
246 return VKEY_T; // (54) T key case 't': case 'T': return 0x54; | 246 return VKEY_T; // (54) T key case 't': case 'T': return 0x54; |
247 case GDK_u: | 247 case GDK_u: |
248 case GDK_U: | 248 case GDK_U: |
249 return VKEY_U; // (55) U key case 'u': case 'U': return 0x55; | 249 return VKEY_U; // (55) U key case 'u': case 'U': return 0x55; |
250 case GDK_v: | 250 case GDK_v: |
251 case GDK_V: | 251 case GDK_V: |
252 return VKEY_V; // (56) V key case 'v': case 'V': return 0x56; | 252 return VKEY_V; // (56) V key case 'v': case 'V': return 0x56; |
253 case GDK_w: | 253 case GDK_w: |
254 case GDK_W: | 254 case GDK_W: |
255 return VKEY_W; // (57) W key case 'w': case 'W': return 0x57; | 255 return VKEY_W; // (57) W key case 'w': case 'W': return 0x57; |
256 case GDK_x: | 256 case GDK_x: |
257 case GDK_X: | 257 case GDK_X: |
258 return VKEY_X; // (58) X key case 'x': case 'X': return 0x58; | 258 return VKEY_X; // (58) X key case 'x': case 'X': return 0x58; |
259 case GDK_y: | 259 case GDK_y: |
260 case GDK_Y: | 260 case GDK_Y: |
261 return VKEY_Y; // (59) Y key case 'y': case 'Y': return 0x59; | 261 return VKEY_Y; // (59) Y key case 'y': case 'Y': return 0x59; |
262 case GDK_z: | 262 case GDK_z: |
263 case GDK_Z: | 263 case GDK_Z: |
264 return VKEY_Z; // (5A) Z key case 'z': case 'Z': return 0x5A; | 264 return VKEY_Z; // (5A) Z key case 'z': case 'Z': return 0x5A; |
265 case GDK_Meta_L: | 265 case GDK_Meta_L: |
266 return VKEY_LWIN; // (5B) Left Windows key (Microsoft Natural keyboard) | 266 return VKEY_LWIN; // (5B) Left Windows key (Microsoft Natural keyboard) |
267 case GDK_Meta_R: | 267 case GDK_Meta_R: |
268 return VKEY_RWIN; // (5C) Right Windows key (Natural keyboard) | 268 return VKEY_RWIN; // (5C) Right Windows key (Natural keyboard) |
269 // VKEY_APPS (5D) Applications key (Natural keyboard) | 269 // VKEY_APPS (5D) Applications key (Natural keyboard) |
270 // VKEY_SLEEP (5F) Computer Sleep key | 270 // VKEY_SLEEP (5F) Computer Sleep key |
271 // VKEY_SEPARATOR (6C) Separator key | 271 // VKEY_SEPARATOR (6C) Separator key |
272 // VKEY_SUBTRACT (6D) Subtract key | 272 // VKEY_SUBTRACT (6D) Subtract key |
273 // VKEY_DECIMAL (6E) Decimal key | 273 // VKEY_DECIMAL (6E) Decimal key |
274 // VKEY_DIVIDE (6F) Divide key | 274 // VKEY_DIVIDE (6F) Divide key |
275 // handled by key code above | 275 // handled by key code above |
276 | 276 |
277 case GDK_Num_Lock: | 277 case GDK_Num_Lock: |
278 return VKEY_NUMLOCK; // (90) NUM LOCK key | 278 return VKEY_NUMLOCK; // (90) NUM LOCK key |
279 | 279 |
280 case GDK_Scroll_Lock: | 280 case GDK_Scroll_Lock: |
281 return VKEY_SCROLL; // (91) SCROLL LOCK key | 281 return VKEY_SCROLL; // (91) SCROLL LOCK key |
282 | 282 |
283 // VKEY_LSHIFT (A0) Left SHIFT key | 283 // VKEY_LSHIFT (A0) Left SHIFT key |
284 // VKEY_RSHIFT (A1) Right SHIFT key | 284 // VKEY_RSHIFT (A1) Right SHIFT key |
285 // VKEY_LCONTROL (A2) Left CONTROL key | 285 // VKEY_LCONTROL (A2) Left CONTROL key |
286 // VKEY_RCONTROL (A3) Right CONTROL key | 286 // VKEY_RCONTROL (A3) Right CONTROL key |
287 // VKEY_LMENU (A4) Left MENU key | 287 // VKEY_LMENU (A4) Left MENU key |
288 // VKEY_RMENU (A5) Right MENU key | 288 // VKEY_RMENU (A5) Right MENU key |
289 // VKEY_BROWSER_BACK (A6) Windows 2000/XP: Browser Back key | 289 // VKEY_BROWSER_BACK (A6) Windows 2000/XP: Browser Back key |
290 // VKEY_BROWSER_FORWARD (A7) Windows 2000/XP: Browser Forward key | 290 // VKEY_BROWSER_FORWARD (A7) Windows 2000/XP: Browser Forward key |
291 // VKEY_BROWSER_REFRESH (A8) Windows 2000/XP: Browser Refresh key | 291 // VKEY_BROWSER_REFRESH (A8) Windows 2000/XP: Browser Refresh key |
(...skipping 10 matching lines...) Expand all Loading... |
302 // VKEY_MEDIA_PLAY_PAUSE (B3) Windows 2000/XP: Play/Pause Media key | 302 // VKEY_MEDIA_PLAY_PAUSE (B3) Windows 2000/XP: Play/Pause Media key |
303 // VKEY_LAUNCH_MAIL (B4) Windows 2000/XP: Start Mail key | 303 // VKEY_LAUNCH_MAIL (B4) Windows 2000/XP: Start Mail key |
304 // VKEY_LAUNCH_MEDIA_SELECT (B5) Windows 2000/XP: Select Media key | 304 // VKEY_LAUNCH_MEDIA_SELECT (B5) Windows 2000/XP: Select Media key |
305 // VKEY_LAUNCH_APP1 (B6) Windows 2000/XP: Start Application 1 key | 305 // VKEY_LAUNCH_APP1 (B6) Windows 2000/XP: Start Application 1 key |
306 // VKEY_LAUNCH_APP2 (B7) Windows 2000/XP: Start Application 2 key | 306 // VKEY_LAUNCH_APP2 (B7) Windows 2000/XP: Start Application 2 key |
307 | 307 |
308 // VKEY_OEM_1 (BA) Used for miscellaneous characters; it can vary by | 308 // VKEY_OEM_1 (BA) Used for miscellaneous characters; it can vary by |
309 // keyboard. Windows 2000/XP: For the US standard keyboard, the ';:' key | 309 // keyboard. Windows 2000/XP: For the US standard keyboard, the ';:' key |
310 case GDK_semicolon: | 310 case GDK_semicolon: |
311 case GDK_colon: | 311 case GDK_colon: |
312 return VKEY_OEM_1; //case ';': case ':': return 0xBA; | 312 return VKEY_OEM_1; // case ';': case ':': return 0xBA; |
313 // VKEY_OEM_PLUS (BB) Windows 2000/XP: For any country/region, the '+' key | 313 // VKEY_OEM_PLUS (BB) Windows 2000/XP: For any country/region, the '+' key |
314 case GDK_plus: | 314 case GDK_plus: |
315 case GDK_equal: | 315 case GDK_equal: |
316 return VKEY_OEM_PLUS; //case '=': case '+': return 0xBB; | 316 return VKEY_OEM_PLUS; // case '=': case '+': return 0xBB; |
317 // VKEY_OEM_COMMA (BC) Windows 2000/XP: For any country/region, the ',' | 317 // VKEY_OEM_COMMA (BC) Windows 2000/XP: For any country/region, the ',' |
318 // key | 318 // key |
319 case GDK_comma: | 319 case GDK_comma: |
320 case GDK_less: | 320 case GDK_less: |
321 return VKEY_OEM_COMMA; //case ',': case '<': return 0xBC; | 321 return VKEY_OEM_COMMA; // case ',': case '<': return 0xBC; |
322 // VKEY_OEM_MINUS (BD) Windows 2000/XP: For any country/region, the '-' | 322 // VKEY_OEM_MINUS (BD) Windows 2000/XP: For any country/region, the '-' |
323 // key | 323 // key |
324 case GDK_minus: | 324 case GDK_minus: |
325 case GDK_underscore: | 325 case GDK_underscore: |
326 return VKEY_OEM_MINUS; //case '-': case '_': return 0xBD; | 326 return VKEY_OEM_MINUS; // case '-': case '_': return 0xBD; |
327 // VKEY_OEM_PERIOD (BE) Windows 2000/XP: For any country/region, the '.' | 327 // VKEY_OEM_PERIOD (BE) Windows 2000/XP: For any country/region, the '.' |
328 // key | 328 // key |
329 case GDK_period: | 329 case GDK_period: |
330 case GDK_greater: | 330 case GDK_greater: |
331 return VKEY_OEM_PERIOD; //case '.': case '>': return 0xBE; | 331 return VKEY_OEM_PERIOD; // case '.': case '>': return 0xBE; |
332 // VKEY_OEM_2 (BF) Used for miscellaneous characters; it can vary by | 332 // VKEY_OEM_2 (BF) Used for miscellaneous characters; it can vary by |
333 // keyboard. Windows 2000/XP: For the US standard keyboard, the '/?' key | 333 // keyboard. Windows 2000/XP: For the US standard keyboard, the '/?' key |
334 case GDK_slash: | 334 case GDK_slash: |
335 case GDK_question: | 335 case GDK_question: |
336 return VKEY_OEM_2; //case '/': case '?': return 0xBF; | 336 return VKEY_OEM_2; // case '/': case '?': return 0xBF; |
337 // VKEY_OEM_3 (C0) Used for miscellaneous characters; it can vary by | 337 // VKEY_OEM_3 (C0) Used for miscellaneous characters; it can vary by |
338 // keyboard. Windows 2000/XP: For the US standard keyboard, the '`~' key | 338 // keyboard. Windows 2000/XP: For the US standard keyboard, the '`~' key |
339 case GDK_asciitilde: | 339 case GDK_asciitilde: |
340 case GDK_quoteleft: | 340 case GDK_quoteleft: |
341 return VKEY_OEM_3; //case '`': case '~': return 0xC0; | 341 return VKEY_OEM_3; // case '`': case '~': return 0xC0; |
342 // VKEY_OEM_4 (DB) Used for miscellaneous characters; it can vary by | 342 // VKEY_OEM_4 (DB) Used for miscellaneous characters; it can vary by |
343 // keyboard. Windows 2000/XP: For the US standard keyboard, the '[{' key | 343 // keyboard. Windows 2000/XP: For the US standard keyboard, the '[{' key |
344 case GDK_bracketleft: | 344 case GDK_bracketleft: |
345 case GDK_braceleft: | 345 case GDK_braceleft: |
346 return VKEY_OEM_4; //case '[': case '{': return 0xDB; | 346 return VKEY_OEM_4; // case '[': case '{': return 0xDB; |
347 // VKEY_OEM_5 (DC) Used for miscellaneous characters; it can vary by | 347 // VKEY_OEM_5 (DC) Used for miscellaneous characters; it can vary by |
348 // keyboard. Windows 2000/XP: For the US standard keyboard, the '\|' key | 348 // keyboard. Windows 2000/XP: For the US standard keyboard, the '\|' key |
349 case GDK_backslash: | 349 case GDK_backslash: |
350 case GDK_bar: | 350 case GDK_bar: |
351 return VKEY_OEM_5; //case '\\': case '|': return 0xDC; | 351 return VKEY_OEM_5; // case '\\': case '|': return 0xDC; |
352 // VKEY_OEM_6 (DD) Used for miscellaneous characters; it can vary by | 352 // VKEY_OEM_6 (DD) Used for miscellaneous characters; it can vary by |
353 // keyboard. Windows 2000/XP: For the US standard keyboard, the ']}' key | 353 // keyboard. Windows 2000/XP: For the US standard keyboard, the ']}' key |
354 case GDK_bracketright: | 354 case GDK_bracketright: |
355 case GDK_braceright: | 355 case GDK_braceright: |
356 return VKEY_OEM_6; // case ']': case '}': return 0xDD; | 356 return VKEY_OEM_6; // case ']': case '}': return 0xDD; |
357 // VKEY_OEM_7 (DE) Used for miscellaneous characters; it can vary by | 357 // VKEY_OEM_7 (DE) Used for miscellaneous characters; it can vary by |
358 // keyboard. Windows 2000/XP: For the US standard keyboard, the | 358 // keyboard. Windows 2000/XP: For the US standard keyboard, the |
359 // 'single-quote/double-quote' key | 359 // 'single-quote/double-quote' key |
360 case GDK_quoteright: | 360 case GDK_quoteright: |
361 case GDK_quotedbl: | 361 case GDK_quotedbl: |
362 return VKEY_OEM_7; // case '\'': case '"': return 0xDE; | 362 return VKEY_OEM_7; // case '\'': case '"': return 0xDE; |
363 // VKEY_OEM_8 (DF) Used for miscellaneous characters; it can vary by | 363 // VKEY_OEM_8 (DF) Used for miscellaneous characters; it can vary by |
364 // keyboard. | 364 // keyboard. |
365 // VKEY_OEM_102 (E2) Windows 2000/XP: Either the angle bracket key or the | 365 // VKEY_OEM_102 (E2) Windows 2000/XP: Either the angle bracket key or the |
366 // backslash key on the RT 102-key keyboard | 366 // backslash key on the RT 102-key keyboard |
367 // VKEY_PROCESSKEY (E5) Windows 95/98/Me, Windows NT 4.0, Windows 2000/XP: | 367 // VKEY_PROCESSKEY (E5) Windows 95/98/Me, Windows NT 4.0, Windows 2000/XP: |
368 // IME PROCESS key | 368 // IME PROCESS key |
369 // VKEY_PACKET (E7) Windows 2000/XP: Used to pass Unicode characters as if | 369 // VKEY_PACKET (E7) Windows 2000/XP: Used to pass Unicode characters as if |
370 // they were keystrokes. The VKEY_PACKET key is the low word of a 32-bit | 370 // they were keystrokes. The VKEY_PACKET key is the low word of a 32-bit |
371 // Virtual Key value used for non-keyboard input methods. For more | 371 // Virtual Key value used for non-keyboard input methods. For more |
372 // information, see Remark in KEYBDINPUT,SendInput, WM_KEYDOWN, and | 372 // information, see Remark in KEYBDINPUT,SendInput, WM_KEYDOWN, and |
(...skipping 236 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
609 return GDK_F1 + (keycode - VKEY_F1); | 609 return GDK_F1 + (keycode - VKEY_F1); |
610 | 610 |
611 default: | 611 default: |
612 return 0; | 612 return 0; |
613 } | 613 } |
614 } | 614 } |
615 | 615 |
616 } // namespace | 616 } // namespace |
617 | 617 |
618 #endif // BASE_KEYBOARD_CODE_CONVERSION_GTK_H_ | 618 #endif // BASE_KEYBOARD_CODE_CONVERSION_GTK_H_ |
OLD | NEW |