1 /*
2 * Copyright (C) 2006, 2007 Apple Inc. All rights reserved.
3 * Copyright (C) 2006 Michael Emmel mike.emmel@gmail.com
4 * Copyright (C) 2007 Holger Hans Peter Freyther
5 * Copyright (C) 2008 Collabora, Ltd. All rights reserved.
6 * All rights reserved.
7 *
8 * Redistribution and use in source and binary forms, with or without
9 * modification, are permitted provided that the following conditions
10 * are met:
11 * 1. Redistributions of source code must retain the above copyright
12 * notice, this list of conditions and the following disclaimer.
13 * 2. Redistributions in binary form must reproduce the above copyright
14 * notice, this list of conditions and the following disclaimer in the
15 * documentation and/or other materials provided with the distribution.
16 *
17 * THIS SOFTWARE IS PROVIDED BY APPLE COMPUTER, INC. ``AS IS'' AND ANY
18 * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
19 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
20 * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE COMPUTER, INC. OR
21 * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
22 * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
23 * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
24 * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
25 * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
26 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
27 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
28 */
29
30 #include "config.h"
31 #include "PlatformKeyboardEvent.h"
32
33 #include "KeyboardCodes.h"
34 #include "NotImplemented.h"
35 #include "TextEncoding.h"
36
37 #include <gdk/gdk.h>
38 #include <gdk/gdkkeysyms.h>
39
40 namespace WebCore {
41
42 // FIXME: This is incomplete. We should change this to mirror
43 // more like what Firefox does, and generate these switch statements
44 // at build time.
keyIdentifierForGdkKeyCode(guint keyCode)45 static String keyIdentifierForGdkKeyCode(guint keyCode)
46 {
47 switch (keyCode) {
48 case GDK_Menu:
49 case GDK_Alt_L:
50 case GDK_Alt_R:
51 return "Alt";
52 case GDK_Clear:
53 return "Clear";
54 case GDK_Down:
55 return "Down";
56 // "End"
57 case GDK_End:
58 return "End";
59 // "Enter"
60 case GDK_ISO_Enter:
61 case GDK_KP_Enter:
62 case GDK_Return:
63 return "Enter";
64 case GDK_Execute:
65 return "Execute";
66 case GDK_F1:
67 return "F1";
68 case GDK_F2:
69 return "F2";
70 case GDK_F3:
71 return "F3";
72 case GDK_F4:
73 return "F4";
74 case GDK_F5:
75 return "F5";
76 case GDK_F6:
77 return "F6";
78 case GDK_F7:
79 return "F7";
80 case GDK_F8:
81 return "F8";
82 case GDK_F9:
83 return "F9";
84 case GDK_F10:
85 return "F10";
86 case GDK_F11:
87 return "F11";
88 case GDK_F12:
89 return "F12";
90 case GDK_F13:
91 return "F13";
92 case GDK_F14:
93 return "F14";
94 case GDK_F15:
95 return "F15";
96 case GDK_F16:
97 return "F16";
98 case GDK_F17:
99 return "F17";
100 case GDK_F18:
101 return "F18";
102 case GDK_F19:
103 return "F19";
104 case GDK_F20:
105 return "F20";
106 case GDK_F21:
107 return "F21";
108 case GDK_F22:
109 return "F22";
110 case GDK_F23:
111 return "F23";
112 case GDK_F24:
113 return "F24";
114 case GDK_Help:
115 return "Help";
116 case GDK_Home:
117 return "Home";
118 case GDK_Insert:
119 return "Insert";
120 case GDK_Left:
121 return "Left";
122 case GDK_Page_Down:
123 return "PageDown";
124 case GDK_Page_Up:
125 return "PageUp";
126 case GDK_Pause:
127 return "Pause";
128 case GDK_3270_PrintScreen:
129 return "PrintScreen";
130 case GDK_Right:
131 return "Right";
132 case GDK_Select:
133 return "Select";
134 case GDK_Up:
135 return "Up";
136 // Standard says that DEL becomes U+007F.
137 case GDK_Delete:
138 return "U+007F";
139 case GDK_ISO_Left_Tab:
140 case GDK_3270_BackTab:
141 case GDK_Tab:
142 return "U+0009";
143 default:
144 return String::format("U+%04X", gdk_keyval_to_unicode(gdk_keyval_to_upper(keyCode)));
145 }
146 }
147
windowsKeyCodeForKeyEvent(unsigned int keycode)148 static int windowsKeyCodeForKeyEvent(unsigned int keycode)
149 {
150 switch (keycode) {
151 case GDK_KP_0:
152 return VK_NUMPAD0;// (60) Numeric keypad 0 key
153 case GDK_KP_1:
154 return VK_NUMPAD1;// (61) Numeric keypad 1 key
155 case GDK_KP_2:
156 return VK_NUMPAD2; // (62) Numeric keypad 2 key
157 case GDK_KP_3:
158 return VK_NUMPAD3; // (63) Numeric keypad 3 key
159 case GDK_KP_4:
160 return VK_NUMPAD4; // (64) Numeric keypad 4 key
161 case GDK_KP_5:
162 return VK_NUMPAD5; //(65) Numeric keypad 5 key
163 case GDK_KP_6:
164 return VK_NUMPAD6; // (66) Numeric keypad 6 key
165 case GDK_KP_7:
166 return VK_NUMPAD7; // (67) Numeric keypad 7 key
167 case GDK_KP_8:
168 return VK_NUMPAD8; // (68) Numeric keypad 8 key
169 case GDK_KP_9:
170 return VK_NUMPAD9; // (69) Numeric keypad 9 key
171 case GDK_KP_Multiply:
172 return VK_MULTIPLY; // (6A) Multiply key
173 case GDK_KP_Add:
174 return VK_ADD; // (6B) Add key
175 case GDK_KP_Subtract:
176 return VK_SUBTRACT; // (6D) Subtract key
177 case GDK_KP_Decimal:
178 return VK_DECIMAL; // (6E) Decimal key
179 case GDK_KP_Divide:
180 return VK_DIVIDE; // (6F) Divide key
181
182 case GDK_BackSpace:
183 return VK_BACK; // (08) BACKSPACE key
184 case GDK_ISO_Left_Tab:
185 case GDK_3270_BackTab:
186 case GDK_Tab:
187 return VK_TAB; // (09) TAB key
188 case GDK_Clear:
189 return VK_CLEAR; // (0C) CLEAR key
190 case GDK_ISO_Enter:
191 case GDK_KP_Enter:
192 case GDK_Return:
193 return VK_RETURN; //(0D) Return key
194 case GDK_Shift_L:
195 case GDK_Shift_R:
196 return VK_SHIFT; // (10) SHIFT key
197 case GDK_Control_L:
198 case GDK_Control_R:
199 return VK_CONTROL; // (11) CTRL key
200 case GDK_Menu:
201 case GDK_Alt_L:
202 case GDK_Alt_R:
203 return VK_MENU; // (12) ALT key
204
205 case GDK_Pause:
206 return VK_PAUSE; // (13) PAUSE key
207 case GDK_Caps_Lock:
208 return VK_CAPITAL; // (14) CAPS LOCK key
209 case GDK_Kana_Lock:
210 case GDK_Kana_Shift:
211 return VK_KANA; // (15) Input Method Editor (IME) Kana mode
212 case GDK_Hangul:
213 return VK_HANGUL; // VK_HANGUL (15) IME Hangul mode
214 // VK_JUNJA (17) IME Junja mode
215 // VK_FINAL (18) IME final mode
216 case GDK_Hangul_Hanja:
217 return VK_HANJA; // (19) IME Hanja mode
218 case GDK_Kanji:
219 return VK_KANJI; // (19) IME Kanji mode
220 case GDK_Escape:
221 return VK_ESCAPE; // (1B) ESC key
222 // VK_CONVERT (1C) IME convert
223 // VK_NONCONVERT (1D) IME nonconvert
224 // VK_ACCEPT (1E) IME accept
225 // VK_MODECHANGE (1F) IME mode change request
226 case GDK_space:
227 return VK_SPACE; // (20) SPACEBAR
228 case GDK_Page_Up:
229 return VK_PRIOR; // (21) PAGE UP key
230 case GDK_Page_Down:
231 return VK_NEXT; // (22) PAGE DOWN key
232 case GDK_End:
233 return VK_END; // (23) END key
234 case GDK_Home:
235 return VK_HOME; // (24) HOME key
236 case GDK_Left:
237 return VK_LEFT; // (25) LEFT ARROW key
238 case GDK_Up:
239 return VK_UP; // (26) UP ARROW key
240 case GDK_Right:
241 return VK_RIGHT; // (27) RIGHT ARROW key
242 case GDK_Down:
243 return VK_DOWN; // (28) DOWN ARROW key
244 case GDK_Select:
245 return VK_SELECT; // (29) SELECT key
246 case GDK_Print:
247 return VK_PRINT; // (2A) PRINT key
248 case GDK_Execute:
249 return VK_EXECUTE;// (2B) EXECUTE key
250 //dunno on this
251 //case GDK_PrintScreen:
252 // return VK_SNAPSHOT; // (2C) PRINT SCREEN key
253 case GDK_Insert:
254 return VK_INSERT; // (2D) INS key
255 case GDK_Delete:
256 return VK_DELETE; // (2E) DEL key
257 case GDK_Help:
258 return VK_HELP; // (2F) HELP key
259 case GDK_0:
260 case GDK_parenright:
261 return VK_0; // (30) 0) key
262 case GDK_1:
263 case GDK_exclam:
264 return VK_1; // (31) 1 ! key
265 case GDK_2:
266 case GDK_at:
267 return VK_2; // (32) 2 & key
268 case GDK_3:
269 case GDK_numbersign:
270 return VK_3; //case '3': case '#';
271 case GDK_4:
272 case GDK_dollar: // (34) 4 key '$';
273 return VK_4;
274 case GDK_5:
275 case GDK_percent:
276 return VK_5; // (35) 5 key '%'
277 case GDK_6:
278 case GDK_asciicircum:
279 return VK_6; // (36) 6 key '^'
280 case GDK_7:
281 case GDK_ampersand:
282 return VK_7; // (37) 7 key case '&'
283 case GDK_8:
284 case GDK_asterisk:
285 return VK_8; // (38) 8 key '*'
286 case GDK_9:
287 case GDK_parenleft:
288 return VK_9; // (39) 9 key '('
289 case GDK_a:
290 case GDK_A:
291 return VK_A; // (41) A key case 'a': case 'A': return 0x41;
292 case GDK_b:
293 case GDK_B:
294 return VK_B; // (42) B key case 'b': case 'B': return 0x42;
295 case GDK_c:
296 case GDK_C:
297 return VK_C; // (43) C key case 'c': case 'C': return 0x43;
298 case GDK_d:
299 case GDK_D:
300 return VK_D; // (44) D key case 'd': case 'D': return 0x44;
301 case GDK_e:
302 case GDK_E:
303 return VK_E; // (45) E key case 'e': case 'E': return 0x45;
304 case GDK_f:
305 case GDK_F:
306 return VK_F; // (46) F key case 'f': case 'F': return 0x46;
307 case GDK_g:
308 case GDK_G:
309 return VK_G; // (47) G key case 'g': case 'G': return 0x47;
310 case GDK_h:
311 case GDK_H:
312 return VK_H; // (48) H key case 'h': case 'H': return 0x48;
313 case GDK_i:
314 case GDK_I:
315 return VK_I; // (49) I key case 'i': case 'I': return 0x49;
316 case GDK_j:
317 case GDK_J:
318 return VK_J; // (4A) J key case 'j': case 'J': return 0x4A;
319 case GDK_k:
320 case GDK_K:
321 return VK_K; // (4B) K key case 'k': case 'K': return 0x4B;
322 case GDK_l:
323 case GDK_L:
324 return VK_L; // (4C) L key case 'l': case 'L': return 0x4C;
325 case GDK_m:
326 case GDK_M:
327 return VK_M; // (4D) M key case 'm': case 'M': return 0x4D;
328 case GDK_n:
329 case GDK_N:
330 return VK_N; // (4E) N key case 'n': case 'N': return 0x4E;
331 case GDK_o:
332 case GDK_O:
333 return VK_O; // (4F) O key case 'o': case 'O': return 0x4F;
334 case GDK_p:
335 case GDK_P:
336 return VK_P; // (50) P key case 'p': case 'P': return 0x50;
337 case GDK_q:
338 case GDK_Q:
339 return VK_Q; // (51) Q key case 'q': case 'Q': return 0x51;
340 case GDK_r:
341 case GDK_R:
342 return VK_R; // (52) R key case 'r': case 'R': return 0x52;
343 case GDK_s:
344 case GDK_S:
345 return VK_S; // (53) S key case 's': case 'S': return 0x53;
346 case GDK_t:
347 case GDK_T:
348 return VK_T; // (54) T key case 't': case 'T': return 0x54;
349 case GDK_u:
350 case GDK_U:
351 return VK_U; // (55) U key case 'u': case 'U': return 0x55;
352 case GDK_v:
353 case GDK_V:
354 return VK_V; // (56) V key case 'v': case 'V': return 0x56;
355 case GDK_w:
356 case GDK_W:
357 return VK_W; // (57) W key case 'w': case 'W': return 0x57;
358 case GDK_x:
359 case GDK_X:
360 return VK_X; // (58) X key case 'x': case 'X': return 0x58;
361 case GDK_y:
362 case GDK_Y:
363 return VK_Y; // (59) Y key case 'y': case 'Y': return 0x59;
364 case GDK_z:
365 case GDK_Z:
366 return VK_Z; // (5A) Z key case 'z': case 'Z': return 0x5A;
367 case GDK_Meta_L:
368 return VK_LWIN; // (5B) Left Windows key (Microsoft Natural keyboard)
369 case GDK_Meta_R:
370 return VK_RWIN; // (5C) Right Windows key (Natural keyboard)
371 // VK_APPS (5D) Applications key (Natural keyboard)
372 // VK_SLEEP (5F) Computer Sleep key
373 // VK_SEPARATOR (6C) Separator key
374 // VK_SUBTRACT (6D) Subtract key
375 // VK_DECIMAL (6E) Decimal key
376 // VK_DIVIDE (6F) Divide key
377 // handled by key code above
378
379 case GDK_Num_Lock:
380 return VK_NUMLOCK; // (90) NUM LOCK key
381
382 case GDK_Scroll_Lock:
383 return VK_SCROLL; // (91) SCROLL LOCK key
384
385 // VK_LSHIFT (A0) Left SHIFT key
386 // VK_RSHIFT (A1) Right SHIFT key
387 // VK_LCONTROL (A2) Left CONTROL key
388 // VK_RCONTROL (A3) Right CONTROL key
389 // VK_LMENU (A4) Left MENU key
390 // VK_RMENU (A5) Right MENU key
391 // VK_BROWSER_BACK (A6) Windows 2000/XP: Browser Back key
392 // VK_BROWSER_FORWARD (A7) Windows 2000/XP: Browser Forward key
393 // VK_BROWSER_REFRESH (A8) Windows 2000/XP: Browser Refresh key
394 // VK_BROWSER_STOP (A9) Windows 2000/XP: Browser Stop key
395 // VK_BROWSER_SEARCH (AA) Windows 2000/XP: Browser Search key
396 // VK_BROWSER_FAVORITES (AB) Windows 2000/XP: Browser Favorites key
397 // VK_BROWSER_HOME (AC) Windows 2000/XP: Browser Start and Home key
398 // VK_VOLUME_MUTE (AD) Windows 2000/XP: Volume Mute key
399 // VK_VOLUME_DOWN (AE) Windows 2000/XP: Volume Down key
400 // VK_VOLUME_UP (AF) Windows 2000/XP: Volume Up key
401 // VK_MEDIA_NEXT_TRACK (B0) Windows 2000/XP: Next Track key
402 // VK_MEDIA_PREV_TRACK (B1) Windows 2000/XP: Previous Track key
403 // VK_MEDIA_STOP (B2) Windows 2000/XP: Stop Media key
404 // VK_MEDIA_PLAY_PAUSE (B3) Windows 2000/XP: Play/Pause Media key
405 // VK_LAUNCH_MAIL (B4) Windows 2000/XP: Start Mail key
406 // VK_LAUNCH_MEDIA_SELECT (B5) Windows 2000/XP: Select Media key
407 // VK_LAUNCH_APP1 (B6) Windows 2000/XP: Start Application 1 key
408 // VK_LAUNCH_APP2 (B7) Windows 2000/XP: Start Application 2 key
409
410 // VK_OEM_1 (BA) Used for miscellaneous characters; it can vary by keyboard. Windows 2000/XP: For the US standard keyboard, the ';:' key
411 case GDK_semicolon:
412 case GDK_colon:
413 return VK_OEM_1; //case ';': case ':': return 0xBA;
414 // VK_OEM_PLUS (BB) Windows 2000/XP: For any country/region, the '+' key
415 case GDK_plus:
416 case GDK_equal:
417 return VK_OEM_PLUS; //case '=': case '+': return 0xBB;
418 // VK_OEM_COMMA (BC) Windows 2000/XP: For any country/region, the ',' key
419 case GDK_comma:
420 case GDK_less:
421 return VK_OEM_COMMA; //case ',': case '<': return 0xBC;
422 // VK_OEM_MINUS (BD) Windows 2000/XP: For any country/region, the '-' key
423 case GDK_minus:
424 case GDK_underscore:
425 return VK_OEM_MINUS; //case '-': case '_': return 0xBD;
426 // VK_OEM_PERIOD (BE) Windows 2000/XP: For any country/region, the '.' key
427 case GDK_period:
428 case GDK_greater:
429 return VK_OEM_PERIOD; //case '.': case '>': return 0xBE;
430 // VK_OEM_2 (BF) Used for miscellaneous characters; it can vary by keyboard. Windows 2000/XP: For the US standard keyboard, the '/?' key
431 case GDK_slash:
432 case GDK_question:
433 return VK_OEM_2; //case '/': case '?': return 0xBF;
434 // VK_OEM_3 (C0) Used for miscellaneous characters; it can vary by keyboard. Windows 2000/XP: For the US standard keyboard, the '`~' key
435 case GDK_asciitilde:
436 case GDK_quoteleft:
437 return VK_OEM_3; //case '`': case '~': return 0xC0;
438 // VK_OEM_4 (DB) Used for miscellaneous characters; it can vary by keyboard. Windows 2000/XP: For the US standard keyboard, the '[{' key
439 case GDK_bracketleft:
440 case GDK_braceleft:
441 return VK_OEM_4; //case '[': case '{': return 0xDB;
442 // VK_OEM_5 (DC) Used for miscellaneous characters; it can vary by keyboard. Windows 2000/XP: For the US standard keyboard, the '\|' key
443 case GDK_backslash:
444 case GDK_bar:
445 return VK_OEM_5; //case '\\': case '|': return 0xDC;
446 // VK_OEM_6 (DD) Used for miscellaneous characters; it can vary by keyboard. Windows 2000/XP: For the US standard keyboard, the ']}' key
447 case GDK_bracketright:
448 case GDK_braceright:
449 return VK_OEM_6; // case ']': case '}': return 0xDD;
450 // VK_OEM_7 (DE) Used for miscellaneous characters; it can vary by keyboard. Windows 2000/XP: For the US standard keyboard, the 'single-quote/double-quote' key
451 case GDK_quoteright:
452 case GDK_quotedbl:
453 return VK_OEM_7; // case '\'': case '"': return 0xDE;
454 // VK_OEM_8 (DF) Used for miscellaneous characters; it can vary by keyboard.
455 // VK_OEM_102 (E2) Windows 2000/XP: Either the angle bracket key or the backslash key on the RT 102-key keyboard
456 // VK_PROCESSKEY (E5) Windows 95/98/Me, Windows NT 4.0, Windows 2000/XP: IME PROCESS key
457 // VK_PACKET (E7) Windows 2000/XP: Used to pass Unicode characters as if they were keystrokes. The VK_PACKET key is the low word of a 32-bit Virtual Key value used for non-keyboard input methods. For more information, see Remark in KEYBDINPUT,SendInput, WM_KEYDOWN, and WM_KEYUP
458 // VK_ATTN (F6) Attn key
459 // VK_CRSEL (F7) CrSel key
460 // VK_EXSEL (F8) ExSel key
461 // VK_EREOF (F9) Erase EOF key
462 // VK_PLAY (FA) Play key
463 // VK_ZOOM (FB) Zoom key
464 // VK_NONAME (FC) Reserved for future use
465 // VK_PA1 (FD) PA1 key
466 // VK_OEM_CLEAR (FE) Clear key
467 case GDK_F1:
468 case GDK_F2:
469 case GDK_F3:
470 case GDK_F4:
471 case GDK_F5:
472 case GDK_F6:
473 case GDK_F7:
474 case GDK_F8:
475 case GDK_F9:
476 case GDK_F10:
477 case GDK_F11:
478 case GDK_F12:
479 case GDK_F13:
480 case GDK_F14:
481 case GDK_F15:
482 case GDK_F16:
483 case GDK_F17:
484 case GDK_F18:
485 case GDK_F19:
486 case GDK_F20:
487 case GDK_F21:
488 case GDK_F22:
489 case GDK_F23:
490 case GDK_F24:
491 return VK_F1 + (keycode - GDK_F1);
492
493 default:
494 return 0;
495 }
496
497 }
498
singleCharacterString(guint val)499 static String singleCharacterString(guint val)
500 {
501 switch (val) {
502 case GDK_ISO_Enter:
503 case GDK_KP_Enter:
504 case GDK_Return:
505 return String("\r");
506 default:
507 gunichar c = gdk_keyval_to_unicode(val);
508 glong nwc;
509 gunichar2* uchar16 = g_ucs4_to_utf16(&c, 1, 0, &nwc, 0);
510
511 String retVal;
512 if (uchar16)
513 retVal = String((UChar*)uchar16, nwc);
514 else
515 retVal = String();
516
517 g_free(uchar16);
518
519 return retVal;
520 }
521 }
522
523 // Keep this in sync with the other platform event constructors
524 // TODO: m_gdkEventKey should be refcounted
PlatformKeyboardEvent(GdkEventKey * event)525 PlatformKeyboardEvent::PlatformKeyboardEvent(GdkEventKey* event)
526 : m_type((event->type == GDK_KEY_RELEASE) ? KeyUp : KeyDown)
527 , m_text(singleCharacterString(event->keyval))
528 , m_unmodifiedText(singleCharacterString(event->keyval))
529 , m_keyIdentifier(keyIdentifierForGdkKeyCode(event->keyval))
530 , m_autoRepeat(false)
531 , m_windowsVirtualKeyCode(windowsKeyCodeForKeyEvent(event->keyval))
532 , m_nativeVirtualKeyCode(event->keyval)
533 , m_isKeypad(event->keyval >= GDK_KP_Space && event->keyval <= GDK_KP_9)
534 , m_shiftKey((event->state & GDK_SHIFT_MASK) || (event->keyval == GDK_3270_BackTab))
535 , m_ctrlKey(event->state & GDK_CONTROL_MASK)
536 , m_altKey(event->state & GDK_MOD1_MASK)
537 , m_metaKey(event->state & GDK_META_MASK)
538 , m_gdkEventKey(event)
539 {
540 }
541
disambiguateKeyDownEvent(Type type,bool backwardCompatibilityMode)542 void PlatformKeyboardEvent::disambiguateKeyDownEvent(Type type, bool backwardCompatibilityMode)
543 {
544 // Can only change type from KeyDown to RawKeyDown or Char, as we lack information for other conversions.
545 ASSERT(m_type == KeyDown);
546 m_type = type;
547
548 if (backwardCompatibilityMode)
549 return;
550
551 if (type == RawKeyDown) {
552 m_text = String();
553 m_unmodifiedText = String();
554 } else {
555 m_keyIdentifier = String();
556 m_windowsVirtualKeyCode = 0;
557 }
558 }
559
currentCapsLockState()560 bool PlatformKeyboardEvent::currentCapsLockState()
561 {
562 notImplemented();
563 return false;
564 }
565
gdkEventKey() const566 GdkEventKey* PlatformKeyboardEvent::gdkEventKey() const
567 {
568 return m_gdkEventKey;
569 }
570
571 }
572