diff options
author | tc@google.com <tc@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2008-10-23 19:38:01 +0000 |
---|---|---|
committer | tc@google.com <tc@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2008-10-23 19:38:01 +0000 |
commit | 524b38893b0dc11de8707292c5348b9823f78787 (patch) | |
tree | 030c3c2538c4926932ef89df8177652eadb5a0b2 | |
parent | 731c1c7dd796644ec894c8727a59adf96dc18d43 (diff) | |
download | chromium_src-524b38893b0dc11de8707292c5348b9823f78787.zip chromium_src-524b38893b0dc11de8707292c5348b9823f78787.tar.gz chromium_src-524b38893b0dc11de8707292c5348b9823f78787.tar.bz2 |
First stab at webinputevent_linux.cc. Coverts GDK events to
our webkit glue classes.
Review URL: http://codereview.chromium.org/7633
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@3840 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r-- | webkit/SConscript.port | 1 | ||||
-rw-r--r-- | webkit/glue/SConscript | 8 | ||||
-rw-r--r-- | webkit/glue/event_conversion.cc | 13 | ||||
-rw-r--r-- | webkit/glue/webinputevent.h | 14 | ||||
-rw-r--r-- | webkit/glue/webinputevent_linux.cc | 150 | ||||
-rw-r--r-- | webkit/port/platform/chromium/KeyCodeConversion.h | 30 | ||||
-rw-r--r-- | webkit/port/platform/chromium/KeyCodeConversionGtk.cpp | 363 | ||||
-rw-r--r-- | webkit/port/platform/chromium/KeyboardCodes.h | 543 |
8 files changed, 1110 insertions, 12 deletions
diff --git a/webkit/SConscript.port b/webkit/SConscript.port index 2de18a2..3cecb43 100644 --- a/webkit/SConscript.port +++ b/webkit/SConscript.port @@ -171,6 +171,7 @@ if env['PLATFORM'] == 'posix': input_files.extend([ '$PORT_DIR/platform/chromium/FileSystemPosix.cpp', '$PORT_DIR/platform/chromium/SoundPosix.cpp', + '$PORT_DIR/platform/chromium/KeyCodeConversionGtk.cpp', '$PORT_DIR/platform/graphics/chromium/FontLinux.cpp', '$PORT_DIR/platform/graphics/chromium/FontCacheLinux.cpp', '$PORT_DIR/platform/graphics/chromium/FontPlatformDataLinux.cpp', diff --git a/webkit/glue/SConscript b/webkit/glue/SConscript index e4f7317..9006cd0 100644 --- a/webkit/glue/SConscript +++ b/webkit/glue/SConscript @@ -72,7 +72,7 @@ input_files = [ if env['PLATFORM'] == 'win32': # TODO(port): These extra files aren't win32-specific, they've just not been # tested on other platforms yet. - input_files.append([ + input_files.extend([ '$PENDING_DIR/AccessibleBase.cpp', '$PENDING_DIR/AccessibleDocument.cpp', 'glue_accessibility.cc', @@ -82,7 +82,11 @@ if env['PLATFORM'] == 'win32': 'plugins/plugin_stream.cc', 'plugins/webplugin_delegate_impl.cc', 'webdropdata.cc', - 'webinputevent_win.cc', ]) +if env['PLATFORM'] == 'win32': + input_files.append('webinputevent_win.cc') +elif env['PLATFORM'] == 'posix': + input_files.append('webinputevent_linux.cc') + env.ChromeStaticLibrary('glue', input_files) diff --git a/webkit/glue/event_conversion.cc b/webkit/glue/event_conversion.cc index d37b2ff..84db42f 100644 --- a/webkit/glue/event_conversion.cc +++ b/webkit/glue/event_conversion.cc @@ -8,6 +8,9 @@ #if defined(OS_WIN) #include <windows.h> +#else +// This file defines all the windows VK_ key codes in the WebCore namespace. +#include "KeyboardCodes.h" #endif #include "StringImpl.h" // This is so that the KJS build works @@ -34,8 +37,7 @@ int MakePlatformMouseEvent::last_click_count_ = 0; uint32 MakePlatformMouseEvent::last_click_time_ = 0; MakePlatformMouseEvent::MakePlatformMouseEvent(Widget* widget, - const WebMouseEvent& e) - { + const WebMouseEvent& e) { #if defined(OS_WIN) || defined(OS_LINUX) // TODO(mpcomplete): widget is always toplevel, unless it's a popup. We // may be able to get rid of this once we abstract popups into a WebKit API. @@ -153,7 +155,6 @@ static inline String ToSingleCharacterString(UChar c) { return String(&c, 1); } -#if defined(OS_WIN) static String GetKeyIdentifierForWindowsKeyCode(unsigned short keyCode) { switch (keyCode) { case VK_MENU: @@ -256,11 +257,6 @@ static String GetKeyIdentifierForWindowsKeyCode(unsigned short keyCode) { return String::format("U+%04X", toupper(keyCode)); } } -#else -static String GetKeyIdentifierForWindowsKeyCode(unsigned short keyCode) { - return String::format("U+%04X", toupper(keyCode)); -} -#endif MakePlatformKeyboardEvent::MakePlatformKeyboardEvent(const WebKeyboardEvent& e) { @@ -321,4 +317,3 @@ bool MakePlatformKeyboardEvent::IsCharacterKey() const { } return true; } - diff --git a/webkit/glue/webinputevent.h b/webkit/glue/webinputevent.h index e6f119c..308e75e 100644 --- a/webkit/glue/webinputevent.h +++ b/webkit/glue/webinputevent.h @@ -16,7 +16,12 @@ #else class NSEvent; #endif // __OBJC__ -#endif // OS_MACOSX +#elif defined(OS_LINUX) +typedef struct _GdkEventButton GdkEventButton; +typedef struct _GdkEventMotion GdkEventMotion; +typedef struct _GdkEventScroll GdkEventScroll; +typedef struct _GdkEventKey GdkEventKey; +#endif // The classes defined in this file are intended to be used with WebView's // HandleInputEvent method. These event types are cross-platform; however, @@ -92,6 +97,9 @@ class WebMouseEvent : public WebInputEvent { WebMouseEvent(HWND hwnd, UINT message, WPARAM wparam, LPARAM lparam); #elif defined(OS_MACOSX) WebMouseEvent(NSEvent *event); +#elif defined(OS_LINUX) + explicit WebMouseEvent(const GdkEventButton* event); + explicit WebMouseEvent(const GdkEventMotion* event); #endif }; @@ -107,6 +115,8 @@ class WebMouseWheelEvent : public WebMouseEvent { WebMouseWheelEvent(HWND hwnd, UINT message, WPARAM wparam, LPARAM lparam); #elif defined(OS_MACOSX) WebMouseWheelEvent(NSEvent *event); +#elif defined(OS_LINUX) + explicit WebMouseWheelEvent(const GdkEventScroll* event); #endif }; @@ -134,6 +144,8 @@ class WebKeyboardEvent : public WebInputEvent { WebKeyboardEvent(HWND hwnd, UINT message, WPARAM wparam, LPARAM lparam); #elif defined(OS_MACOSX) WebKeyboardEvent(NSEvent *event); +#elif defined(OS_LINUX) + explicit WebKeyboardEvent(const GdkEventKey* event); #endif }; diff --git a/webkit/glue/webinputevent_linux.cc b/webkit/glue/webinputevent_linux.cc new file mode 100644 index 0000000..b48cb01 --- /dev/null +++ b/webkit/glue/webinputevent_linux.cc @@ -0,0 +1,150 @@ +// Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +#include "config.h" + +#include "webkit/glue/webinputevent.h" + +#include "webkit/glue/event_conversion.h" + +#include "KeyboardCodes.h" +#include "KeyCodeConversion.h" + +#include <gdk/gdk.h> +#include <gdk/gdkkeysyms.h> +#include <gtk/gtkversion.h> + +namespace { + +double GdkEventTimeToWebEventTime(guint32 time) { + // Convert from time in ms to time in sec. + return time / 1000.0; +} + +int GdkStateToWebEventModifiers(guint state) { + int modifiers = 0; + if (state & GDK_SHIFT_MASK) + modifiers |= WebInputEvent::SHIFT_KEY; + if (state & GDK_CONTROL_MASK) + modifiers |= WebInputEvent::CTRL_KEY; + if (state & GDK_MOD1_MASK) + modifiers |= WebInputEvent::ALT_KEY; +#if GTK_CHECK_VERSION(2,10,0) + if (state & GDK_META_MASK) + modifiers |= WebInputEvent::META_KEY; +#endif + return modifiers; +} + +} // namespace + +WebMouseEvent::WebMouseEvent(const GdkEventButton* event) { + timestamp_sec = GdkEventTimeToWebEventTime(event->time); + modifiers = GdkStateToWebEventModifiers(event->state); + x = static_cast<int>(event->x); + y = static_cast<int>(event->y); + global_x = static_cast<int>(event->x_root); + global_y = static_cast<int>(event->y_root); + + switch (event->type) { + case GDK_BUTTON_PRESS: + case GDK_2BUTTON_PRESS: + case GDK_3BUTTON_PRESS: + type = MOUSE_DOWN; + break; + case GDK_BUTTON_RELEASE: + type = MOUSE_UP; + break; + + default: + ASSERT_NOT_REACHED(); + }; + + button = BUTTON_NONE; + if (event->button == 1) { + button = BUTTON_LEFT; + } else if (event->button == 2) { + button = BUTTON_MIDDLE; + } else if (event->button == 3) { + button = BUTTON_RIGHT; + } +} + +WebMouseEvent::WebMouseEvent(const GdkEventMotion* event) { + timestamp_sec = GdkEventTimeToWebEventTime(event->time); + modifiers = GdkStateToWebEventModifiers(event->state); + x = static_cast<int>(event->x); + y = static_cast<int>(event->y); + global_x = static_cast<int>(event->x_root); + global_y = static_cast<int>(event->y_root); + + switch (event->type) { + case GDK_MOTION_NOTIFY: + type = MOUSE_MOVE; + break; + default: + ASSERT_NOT_REACHED(); + } + + button = BUTTON_NONE; + if (event->state & GDK_BUTTON1_MASK) { + button = BUTTON_LEFT; + } else if (event->state & GDK_BUTTON2_MASK) { + button = BUTTON_MIDDLE; + } else if (event->state & GDK_BUTTON3_MASK) { + button = BUTTON_RIGHT; + } +} + +WebMouseWheelEvent::WebMouseWheelEvent(const GdkEventScroll* event) { + timestamp_sec = GdkEventTimeToWebEventTime(event->time); + modifiers = GdkStateToWebEventModifiers(event->state); + x = static_cast<int>(event->x); + y = static_cast<int>(event->y); + global_x = static_cast<int>(event->x_root); + global_y = static_cast<int>(event->y_root); + + type = MOUSE_WHEEL; + + // TODO(tc): Figure out what the right value for this is. + static const int kWheelDelta = 1; + + delta_x = 0; + delta_y = 0; + + switch (event->direction) { + case GDK_SCROLL_UP: + delta_y = kWheelDelta; + break; + case GDK_SCROLL_DOWN: + delta_y = -kWheelDelta; + break; + case GDK_SCROLL_LEFT: + delta_x = -kWheelDelta; + break; + case GDK_SCROLL_RIGHT: + delta_x = kWheelDelta; + break; + default: + break; + } +} + +WebKeyboardEvent::WebKeyboardEvent(const GdkEventKey* event) { + modifiers = GdkStateToWebEventModifiers(event->state); + + switch (event->type) { + case GDK_KEY_RELEASE: + type = KEY_UP; + break; + case GDK_KEY_PRESS: + type = KEY_DOWN; + break; + default: + break; + } + key_code = WebCore::windowsKeyCodeForKeyEvent(event->keyval); + + // TODO(tc): Do we need to set IS_AUTO_REPEAT or IS_KEYPAD? +} diff --git a/webkit/port/platform/chromium/KeyCodeConversion.h b/webkit/port/platform/chromium/KeyCodeConversion.h new file mode 100644 index 0000000..b7f96d9 --- /dev/null +++ b/webkit/port/platform/chromium/KeyCodeConversion.h @@ -0,0 +1,30 @@ +/* + * Copyright (C) 2006, 2007 Apple Inc. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY APPLE COMPUTER, INC. ``AS IS'' AND ANY + * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE COMPUTER, INC. OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY + * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +namespace WebCore { + +int windowsKeyCodeForKeyEvent(unsigned int keycode); + +} diff --git a/webkit/port/platform/chromium/KeyCodeConversionGtk.cpp b/webkit/port/platform/chromium/KeyCodeConversionGtk.cpp new file mode 100644 index 0000000..8c1aef7 --- /dev/null +++ b/webkit/port/platform/chromium/KeyCodeConversionGtk.cpp @@ -0,0 +1,363 @@ +// WindowsKeyCodeForKeyEvent is taken from +// WebKit/WebCore/platform/gtk/KeyEventGtk.cpp +/* + * Copyright (C) 2006, 2007 Apple Inc. All rights reserved. + * Copyright (C) 2006 Michael Emmel mike.emmel@gmail.com + * Copyright (C) 2007 Holger Hans Peter Freyther + * Copyright (C) 2008 Collabora, Ltd. All rights reserved. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY APPLE COMPUTER, INC. ``AS IS'' AND ANY + * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE COMPUTER, INC. OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY + * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "KeyCodeConversion.h" +#include "KeyboardCodes.h" + +#include <gdk/gdkkeysyms.h> + +namespace WebCore { + +int windowsKeyCodeForKeyEvent(unsigned int keycode) +{ + switch (keycode) { + case GDK_KP_0: + return VK_NUMPAD0;// (60) Numeric keypad 0 key + case GDK_KP_1: + return VK_NUMPAD1;// (61) Numeric keypad 1 key + case GDK_KP_2: + return VK_NUMPAD2; // (62) Numeric keypad 2 key + case GDK_KP_3: + return VK_NUMPAD3; // (63) Numeric keypad 3 key + case GDK_KP_4: + return VK_NUMPAD4; // (64) Numeric keypad 4 key + case GDK_KP_5: + return VK_NUMPAD5; //(65) Numeric keypad 5 key + case GDK_KP_6: + return VK_NUMPAD6; // (66) Numeric keypad 6 key + case GDK_KP_7: + return VK_NUMPAD7; // (67) Numeric keypad 7 key + case GDK_KP_8: + return VK_NUMPAD8; // (68) Numeric keypad 8 key + case GDK_KP_9: + return VK_NUMPAD9; // (69) Numeric keypad 9 key + case GDK_KP_Multiply: + return VK_MULTIPLY; // (6A) Multiply key + case GDK_KP_Add: + return VK_ADD; // (6B) Add key + case GDK_KP_Subtract: + return VK_SUBTRACT; // (6D) Subtract key + case GDK_KP_Decimal: + return VK_DECIMAL; // (6E) Decimal key + case GDK_KP_Divide: + return VK_DIVIDE; // (6F) Divide key + + case GDK_BackSpace: + return VK_BACK; // (08) BACKSPACE key + case GDK_ISO_Left_Tab: + case GDK_3270_BackTab: + case GDK_Tab: + return VK_TAB; // (09) TAB key + case GDK_Clear: + return VK_CLEAR; // (0C) CLEAR key + case GDK_ISO_Enter: + case GDK_KP_Enter: + case GDK_Return: + return VK_RETURN; //(0D) Return key + case GDK_Shift_L: + case GDK_Shift_R: + return VK_SHIFT; // (10) SHIFT key + case GDK_Control_L: + case GDK_Control_R: + return VK_CONTROL; // (11) CTRL key + case GDK_Menu: + case GDK_Alt_L: + case GDK_Alt_R: + return VK_MENU; // (12) ALT key + + case GDK_Pause: + return VK_PAUSE; // (13) PAUSE key + case GDK_Caps_Lock: + return VK_CAPITAL; // (14) CAPS LOCK key + case GDK_Kana_Lock: + case GDK_Kana_Shift: + return VK_KANA; // (15) Input Method Editor (IME) Kana mode + case GDK_Hangul: + return VK_HANGUL; // VK_HANGUL (15) IME Hangul mode + // VK_JUNJA (17) IME Junja mode + // VK_FINAL (18) IME final mode + case GDK_Hangul_Hanja: + return VK_HANJA; // (19) IME Hanja mode + case GDK_Kanji: + return VK_KANJI; // (19) IME Kanji mode + case GDK_Escape: + return VK_ESCAPE; // (1B) ESC key + // VK_CONVERT (1C) IME convert + // VK_NONCONVERT (1D) IME nonconvert + // VK_ACCEPT (1E) IME accept + // VK_MODECHANGE (1F) IME mode change request + case GDK_space: + return VK_SPACE; // (20) SPACEBAR + case GDK_Page_Up: + return VK_PRIOR; // (21) PAGE UP key + case GDK_Page_Down: + return VK_NEXT; // (22) PAGE DOWN key + case GDK_End: + return VK_END; // (23) END key + case GDK_Home: + return VK_HOME; // (24) HOME key + case GDK_Left: + return VK_LEFT; // (25) LEFT ARROW key + case GDK_Up: + return VK_UP; // (26) UP ARROW key + case GDK_Right: + return VK_RIGHT; // (27) RIGHT ARROW key + case GDK_Down: + return VK_DOWN; // (28) DOWN ARROW key + case GDK_Select: + return VK_SELECT; // (29) SELECT key + case GDK_Print: + return VK_PRINT; // (2A) PRINT key + case GDK_Execute: + return VK_EXECUTE;// (2B) EXECUTE key + //dunno on this + //case GDK_PrintScreen: + // return VK_SNAPSHOT; // (2C) PRINT SCREEN key + case GDK_Insert: + return VK_INSERT; // (2D) INS key + case GDK_Delete: + return VK_DELETE; // (2E) DEL key + case GDK_Help: + return VK_HELP; // (2F) HELP key + case GDK_0: + case GDK_parenleft: + return VK_0; // (30) 0) key + case GDK_1: + return VK_1; // (31) 1 ! key + case GDK_2: + case GDK_at: + return VK_2; // (32) 2 & key + case GDK_3: + case GDK_numbersign: + return VK_3; //case '3': case '#'; + case GDK_4: + case GDK_dollar: // (34) 4 key '$'; + return VK_4; + case GDK_5: + case GDK_percent: + return VK_5; // (35) 5 key '%' + case GDK_6: + case GDK_asciicircum: + return VK_6; // (36) 6 key '^' + case GDK_7: + case GDK_ampersand: + return VK_7; // (37) 7 key case '&' + case GDK_8: + case GDK_asterisk: + return VK_8; // (38) 8 key '*' + case GDK_9: + case GDK_parenright: + return VK_9; // (39) 9 key '(' + case GDK_a: + case GDK_A: + return VK_A; // (41) A key case 'a': case 'A': return 0x41; + case GDK_b: + case GDK_B: + return VK_B; // (42) B key case 'b': case 'B': return 0x42; + case GDK_c: + case GDK_C: + return VK_C; // (43) C key case 'c': case 'C': return 0x43; + case GDK_d: + case GDK_D: + return VK_D; // (44) D key case 'd': case 'D': return 0x44; + case GDK_e: + case GDK_E: + return VK_E; // (45) E key case 'e': case 'E': return 0x45; + case GDK_f: + case GDK_F: + return VK_F; // (46) F key case 'f': case 'F': return 0x46; + case GDK_g: + case GDK_G: + return VK_G; // (47) G key case 'g': case 'G': return 0x47; + case GDK_h: + case GDK_H: + return VK_H; // (48) H key case 'h': case 'H': return 0x48; + case GDK_i: + case GDK_I: + return VK_I; // (49) I key case 'i': case 'I': return 0x49; + case GDK_j: + case GDK_J: + return VK_J; // (4A) J key case 'j': case 'J': return 0x4A; + case GDK_k: + case GDK_K: + return VK_K; // (4B) K key case 'k': case 'K': return 0x4B; + case GDK_l: + case GDK_L: + return VK_L; // (4C) L key case 'l': case 'L': return 0x4C; + case GDK_m: + case GDK_M: + return VK_M; // (4D) M key case 'm': case 'M': return 0x4D; + case GDK_n: + case GDK_N: + return VK_N; // (4E) N key case 'n': case 'N': return 0x4E; + case GDK_o: + case GDK_O: + return VK_O; // (4F) O key case 'o': case 'O': return 0x4F; + case GDK_p: + case GDK_P: + return VK_P; // (50) P key case 'p': case 'P': return 0x50; + case GDK_q: + case GDK_Q: + return VK_Q; // (51) Q key case 'q': case 'Q': return 0x51; + case GDK_r: + case GDK_R: + return VK_R; // (52) R key case 'r': case 'R': return 0x52; + case GDK_s: + case GDK_S: + return VK_S; // (53) S key case 's': case 'S': return 0x53; + case GDK_t: + case GDK_T: + return VK_T; // (54) T key case 't': case 'T': return 0x54; + case GDK_u: + case GDK_U: + return VK_U; // (55) U key case 'u': case 'U': return 0x55; + case GDK_v: + case GDK_V: + return VK_V; // (56) V key case 'v': case 'V': return 0x56; + case GDK_w: + case GDK_W: + return VK_W; // (57) W key case 'w': case 'W': return 0x57; + case GDK_x: + case GDK_X: + return VK_X; // (58) X key case 'x': case 'X': return 0x58; + case GDK_y: + case GDK_Y: + return VK_Y; // (59) Y key case 'y': case 'Y': return 0x59; + case GDK_z: + case GDK_Z: + return VK_Z; // (5A) Z key case 'z': case 'Z': return 0x5A; + case GDK_Meta_L: + return VK_LWIN; // (5B) Left Windows key (Microsoft Natural keyboard) + case GDK_Meta_R: + return VK_RWIN; // (5C) Right Windows key (Natural keyboard) + // VK_APPS (5D) Applications key (Natural keyboard) + // VK_SLEEP (5F) Computer Sleep key + // VK_SEPARATOR (6C) Separator key + // VK_SUBTRACT (6D) Subtract key + // VK_DECIMAL (6E) Decimal key + // VK_DIVIDE (6F) Divide key + // handled by key code above + + case GDK_Num_Lock: + return VK_NUMLOCK; // (90) NUM LOCK key + + case GDK_Scroll_Lock: + return VK_SCROLL; // (91) SCROLL LOCK key + + // VK_LSHIFT (A0) Left SHIFT key + // VK_RSHIFT (A1) Right SHIFT key + // VK_LCONTROL (A2) Left CONTROL key + // VK_RCONTROL (A3) Right CONTROL key + // VK_LMENU (A4) Left MENU key + // VK_RMENU (A5) Right MENU key + // VK_BROWSER_BACK (A6) Windows 2000/XP: Browser Back key + // VK_BROWSER_FORWARD (A7) Windows 2000/XP: Browser Forward key + // VK_BROWSER_REFRESH (A8) Windows 2000/XP: Browser Refresh key + // VK_BROWSER_STOP (A9) Windows 2000/XP: Browser Stop key + // VK_BROWSER_SEARCH (AA) Windows 2000/XP: Browser Search key + // VK_BROWSER_FAVORITES (AB) Windows 2000/XP: Browser Favorites key + // VK_BROWSER_HOME (AC) Windows 2000/XP: Browser Start and Home key + // VK_VOLUME_MUTE (AD) Windows 2000/XP: Volume Mute key + // VK_VOLUME_DOWN (AE) Windows 2000/XP: Volume Down key + // VK_VOLUME_UP (AF) Windows 2000/XP: Volume Up key + // VK_MEDIA_NEXT_TRACK (B0) Windows 2000/XP: Next Track key + // VK_MEDIA_PREV_TRACK (B1) Windows 2000/XP: Previous Track key + // VK_MEDIA_STOP (B2) Windows 2000/XP: Stop Media key + // VK_MEDIA_PLAY_PAUSE (B3) Windows 2000/XP: Play/Pause Media key + // VK_LAUNCH_MAIL (B4) Windows 2000/XP: Start Mail key + // VK_LAUNCH_MEDIA_SELECT (B5) Windows 2000/XP: Select Media key + // VK_LAUNCH_APP1 (B6) Windows 2000/XP: Start Application 1 key + // VK_LAUNCH_APP2 (B7) Windows 2000/XP: Start Application 2 key + + // VK_OEM_1 (BA) Used for miscellaneous characters; it can vary by keyboard. Windows 2000/XP: For the US standard keyboard, the ';:' key + case GDK_semicolon: + case GDK_colon: + return VK_OEM_1; //case ';': case ':': return 0xBA; + // VK_OEM_PLUS (BB) Windows 2000/XP: For any country/region, the '+' key + case GDK_plus: + case GDK_equal: + return VK_OEM_PLUS; //case '=': case '+': return 0xBB; + // VK_OEM_COMMA (BC) Windows 2000/XP: For any country/region, the ',' key + case GDK_comma: + case GDK_less: + return VK_OEM_COMMA; //case ',': case '<': return 0xBC; + // VK_OEM_MINUS (BD) Windows 2000/XP: For any country/region, the '-' key + case GDK_minus: + case GDK_underscore: + return VK_OEM_MINUS; //case '-': case '_': return 0xBD; + // VK_OEM_PERIOD (BE) Windows 2000/XP: For any country/region, the '.' key + case GDK_period: + case GDK_greater: + return VK_OEM_PERIOD; //case '.': case '>': return 0xBE; + // VK_OEM_2 (BF) Used for miscellaneous characters; it can vary by keyboard. Windows 2000/XP: For the US standard keyboard, the '/?' key + case GDK_slash: + case GDK_question: + return VK_OEM_2; //case '/': case '?': return 0xBF; + // VK_OEM_3 (C0) Used for miscellaneous characters; it can vary by keyboard. Windows 2000/XP: For the US standard keyboard, the '`~' key + case GDK_asciitilde: + case GDK_quoteleft: + return VK_OEM_3; //case '`': case '~': return 0xC0; + // VK_OEM_4 (DB) Used for miscellaneous characters; it can vary by keyboard. Windows 2000/XP: For the US standard keyboard, the '[{' key + case GDK_bracketleft: + case GDK_braceleft: + return VK_OEM_4; //case '[': case '{': return 0xDB; + // VK_OEM_5 (DC) Used for miscellaneous characters; it can vary by keyboard. Windows 2000/XP: For the US standard keyboard, the '\|' key + case GDK_backslash: + case GDK_bar: + return VK_OEM_5; //case '\\': case '|': return 0xDC; + // VK_OEM_6 (DD) Used for miscellaneous characters; it can vary by keyboard. Windows 2000/XP: For the US standard keyboard, the ']}' key + case GDK_bracketright: + case GDK_braceright: + return VK_OEM_6; // case ']': case '}': return 0xDD; + // 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 + case GDK_quoteright: + case GDK_quotedbl: + return VK_OEM_7; // case '\'': case '"': return 0xDE; + // VK_OEM_8 (DF) Used for miscellaneous characters; it can vary by keyboard. + // VK_OEM_102 (E2) Windows 2000/XP: Either the angle bracket key or the backslash key on the RT 102-key keyboard + // VK_PROCESSKEY (E5) Windows 95/98/Me, Windows NT 4.0, Windows 2000/XP: IME PROCESS key + // 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 + // VK_ATTN (F6) Attn key + // VK_CRSEL (F7) CrSel key + // VK_EXSEL (F8) ExSel key + // VK_EREOF (F9) Erase EOF key + // VK_PLAY (FA) Play key + // VK_ZOOM (FB) Zoom key + // VK_NONAME (FC) Reserved for future use + // VK_PA1 (FD) PA1 key + // VK_OEM_CLEAR (FE) Clear key + default: + return 0; + } + +} + +} diff --git a/webkit/port/platform/chromium/KeyboardCodes.h b/webkit/port/platform/chromium/KeyboardCodes.h new file mode 100644 index 0000000..3ad1243 --- /dev/null +++ b/webkit/port/platform/chromium/KeyboardCodes.h @@ -0,0 +1,543 @@ +/* + * Copyright (C) 2006 Michael Emmel mike.emmel@gmail.com + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY APPLE COMPUTER, INC. ``AS IS'' AND ANY + * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE COMPUTER, INC. OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY + * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#ifndef KeyboardCodes_h +#define KeyboardCodes_h + +namespace WebCore { + +// VK_LBUTTON (01) Left mouse button +// VK_RBUTTON (02) Right mouse button +// VK_CANCEL (03) Control-break processing +// VK_MBUTTON (04) Middle mouse button (three-button mouse) +// VK_XBUTTON1 (05) +// VK_XBUTTON2 (06) + +// VK_BACK (08) BACKSPACE key +const int VK_BACK = 0x08; + +// VK_TAB (09) TAB key +const int VK_TAB = 0x09; + +// VK_CLEAR (0C) CLEAR key +const int VK_CLEAR = 0x0C; + +// VK_RETURN (0D) +const int VK_RETURN = 0x0D; + +// VK_SHIFT (10) SHIFT key +const int VK_SHIFT = 0x10; + +// VK_CONTROL (11) CTRL key +const int VK_CONTROL = 0x11; + +// VK_MENU (12) ALT key +const int VK_MENU = 0x12; + +// VK_PAUSE (13) PAUSE key +const int VK_PAUSE = 0x13; + +// VK_CAPITAL (14) CAPS LOCK key +const int VK_CAPITAL = 0x14; + +// VK_KANA (15) Input Method Editor (IME) Kana mode +const int VK_KANA = 0x15; + +// VK_HANGUEL (15) IME Hanguel mode (maintained for compatibility; use VK_HANGUL) +// VK_HANGUL (15) IME Hangul mode +const int VK_HANGUL = 0x15; + +// VK_JUNJA (17) IME Junja mode +const int VK_JUNJA = 0x17; + +// VK_FINAL (18) IME final mode +const int VK_FINAL = 0x18; + +// VK_HANJA (19) IME Hanja mode +const int VK_HANJA = 0x19; + +// VK_KANJI (19) IME Kanji mode +const int VK_KANJI = 0x19; + +// VK_ESCAPE (1B) ESC key +const int VK_ESCAPE = 0x1B; + +// VK_CONVERT (1C) IME convert +const int VK_CONVERT = 0x1C; + +// VK_NONCONVERT (1D) IME nonconvert +const int VK_NONCONVERT = 0x1D; + +// VK_ACCEPT (1E) IME accept +const int VK_ACCEPT = 0x1E; + +// VK_MODECHANGE (1F) IME mode change request +const int VK_MODECHANGE = 0x1F; + +// VK_SPACE (20) SPACEBAR +const int VK_SPACE = 0x20; + +// VK_PRIOR (21) PAGE UP key +const int VK_PRIOR = 0x21; + +// VK_NEXT (22) PAGE DOWN key +const int VK_NEXT = 0x22; + +// VK_END (23) END key +const int VK_END = 0x23; + +// VK_HOME (24) HOME key +const int VK_HOME = 0x24; + +// VK_LEFT (25) LEFT ARROW key +const int VK_LEFT = 0x25; + +// VK_UP (26) UP ARROW key +const int VK_UP = 0x26; + +// VK_RIGHT (27) RIGHT ARROW key +const int VK_RIGHT = 0x27; + +// VK_DOWN (28) DOWN ARROW key +const int VK_DOWN = 0x28; + +// VK_SELECT (29) SELECT key +const int VK_SELECT = 0x29; + +// VK_PRINT (2A) PRINT key +const int VK_PRINT = 0x2A; + +// VK_EXECUTE (2B) EXECUTE key +const int VK_EXECUTE = 0x2B; + +// VK_SNAPSHOT (2C) PRINT SCREEN key +const int VK_SNAPSHOT = 0x2C; + +// VK_INSERT (2D) INS key +const int VK_INSERT = 0x2D; + +// VK_DELETE (2E) DEL key +const int VK_DELETE = 0x2E; + +// VK_HELP (2F) HELP key +const int VK_HELP = 0x2F; + +// (30) 0 key +const int VK_0 = 0x30; + +// (31) 1 key +const int VK_1 = 0x31; + +// (32) 2 key +const int VK_2 = 0x32; + +// (33) 3 key +const int VK_3 = 0x33; + +// (34) 4 key +const int VK_4 = 0x34; + +// (35) 5 key; + +const int VK_5 = 0x35; + +// (36) 6 key +const int VK_6 = 0x36; + +// (37) 7 key +const int VK_7 = 0x37; + +// (38) 8 key +const int VK_8 = 0x38; + +// (39) 9 key +const int VK_9 = 0x39; + +// (41) A key +const int VK_A = 0x41; + +// (42) B key +const int VK_B = 0x42; + +// (43) C key +const int VK_C = 0x43; + +// (44) D key +const int VK_D = 0x44; + +// (45) E key +const int VK_E = 0x45; + +// (46) F key +const int VK_F = 0x46; + +// (47) G key +const int VK_G = 0x47; + +// (48) H key +const int VK_H = 0x48; + +// (49) I key +const int VK_I = 0x49; + +// (4A) J key +const int VK_J = 0x4A; + +// (4B) K key +const int VK_K = 0x4B; + +// (4C) L key +const int VK_L = 0x4C; + +// (4D) M key +const int VK_M = 0x4D; + +// (4E) N key +const int VK_N = 0x4E; + +// (4F) O key +const int VK_O = 0x4F; + +// (50) P key +const int VK_P = 0x50; + +// (51) Q key +const int VK_Q = 0x51; + +// (52) R key +const int VK_R = 0x52; + +// (53) S key +const int VK_S = 0x53; + +// (54) T key +const int VK_T = 0x54; + +// (55) U key +const int VK_U = 0x55; + +// (56) V key +const int VK_V = 0x56; + +// (57) W key +const int VK_W = 0x57; + +// (58) X key +const int VK_X = 0x58; + +// (59) Y key +const int VK_Y = 0x59; + +// (5A) Z key +const int VK_Z = 0x5A; + +// VK_LWIN (5B) Left Windows key (Microsoft Natural keyboard) +const int VK_LWIN = 0x5B; + +// VK_RWIN (5C) Right Windows key (Natural keyboard) +const int VK_RWIN = 0x5C; + +// VK_APPS (5D) Applications key (Natural keyboard) +const int VK_APPS = 0x5D; + +// VK_SLEEP (5F) Computer Sleep key +const int VK_SLEEP = 0x5F; + +// VK_NUMPAD0 (60) Numeric keypad 0 key +const int VK_NUMPAD0 = 0x60; + +// VK_NUMPAD1 (61) Numeric keypad 1 key +const int VK_NUMPAD1 = 0x61; + +// VK_NUMPAD2 (62) Numeric keypad 2 key +const int VK_NUMPAD2 = 0x62; + +// VK_NUMPAD3 (63) Numeric keypad 3 key +const int VK_NUMPAD3 = 0x63; + +// VK_NUMPAD4 (64) Numeric keypad 4 key +const int VK_NUMPAD4 = 0x64; + +// VK_NUMPAD5 (65) Numeric keypad 5 key +const int VK_NUMPAD5 = 0x65; + +// VK_NUMPAD6 (66) Numeric keypad 6 key +const int VK_NUMPAD6 = 0x66; + +// VK_NUMPAD7 (67) Numeric keypad 7 key +const int VK_NUMPAD7 = 0x67; + +// VK_NUMPAD8 (68) Numeric keypad 8 key +const int VK_NUMPAD8 = 0x68; + +// VK_NUMPAD9 (69) Numeric keypad 9 key +const int VK_NUMPAD9 = 0x69; + +// VK_MULTIPLY (6A) Multiply key +const int VK_MULTIPLY = 0x6A; + +// VK_ADD (6B) Add key +const int VK_ADD = 0x6B; + +// VK_SEPARATOR (6C) Separator key +const int VK_SEPARATOR = 0x6C; + +// VK_SUBTRACT (6D) Subtract key +const int VK_SUBTRACT = 0x6D; + +// VK_DECIMAL (6E) Decimal key +const int VK_DECIMAL = 0x6E; + +// VK_DIVIDE (6F) Divide key +const int VK_DIVIDE = 0x6F; + +// VK_F1 (70) F1 key +const int VK_F1 = 0x70; + +// VK_F2 (71) F2 key +const int VK_F2 = 0x71; + +// VK_F3 (72) F3 key +const int VK_F3 = 0x72; + +// VK_F4 (73) F4 key +const int VK_F4 = 0x73; + +// VK_F5 (74) F5 key +const int VK_F5 = 0x74; + +// VK_F6 (75) F6 key +const int VK_F6 = 0x75; + +// VK_F7 (76) F7 key +const int VK_F7 = 0x76; + +// VK_F8 (77) F8 key +const int VK_F8 = 0x77; + +// VK_F9 (78) F9 key +const int VK_F9 = 0x78; + +// VK_F10 (79) F10 key +const int VK_F10 = 0x79; + +// VK_F11 (7A) F11 key +const int VK_F11 = 0x7A; + +// VK_F12 (7B) F12 key +const int VK_F12 = 0x7B; + +// VK_F13 (7C) F13 key +const int VK_F13 = 0x7C; + +// VK_F14 (7D) F14 key +const int VK_F14 = 0x7D; + +// VK_F15 (7E) F15 key +const int VK_F15 = 0x7E; + +// VK_F16 (7F) F16 key +const int VK_F16 = 0x7F; + +// VK_F17 (80H) F17 key +const int VK_F17 = 0x80; + +// VK_F18 (81H) F18 key +const int VK_F18 = 0x81; + +// VK_F19 (82H) F19 key +const int VK_F19 = 0x82; + +// VK_F20 (83H) F20 key +const int VK_F20 = 0x83; + +// VK_F21 (84H) F21 key +const int VK_F21 = 0x84; + +// VK_F22 (85H) F22 key +const int VK_F22 = 0x85; + +// VK_F23 (86H) F23 key +const int VK_F23 = 0x86; + +// VK_F24 (87H) F24 key +const int VK_F24 = 0x87; + +// VK_NUMLOCK (90) NUM LOCK key +const int VK_NUMLOCK = 0x90; + +// VK_SCROLL (91) SCROLL LOCK key +const int VK_SCROLL = 0x91; + +// VK_LSHIFT (A0) Left SHIFT key +const int VK_LSHIFT = 0xA0; + +// VK_RSHIFT (A1) Right SHIFT key +const int VK_RSHIFT = 0xA1; + +// VK_LCONTROL (A2) Left CONTROL key +const int VK_LCONTROL = 0xA2; + +// VK_RCONTROL (A3) Right CONTROL key +const int VK_RCONTROL = 0xA3; + +// VK_LMENU (A4) Left MENU key +const int VK_LMENU = 0xA4; + +// VK_RMENU (A5) Right MENU key +const int VK_RMENU = 0xA5; + +// VK_BROWSER_BACK (A6) Windows 2000/XP: Browser Back key +const int VK_BROWSER_BACK = 0xA6; + +// VK_BROWSER_FORWARD (A7) Windows 2000/XP: Browser Forward key +const int VK_BROWSER_FORWARD = 0xA7; + +// VK_BROWSER_REFRESH (A8) Windows 2000/XP: Browser Refresh key +const int VK_BROWSER_REFRESH = 0xA8; + +// VK_BROWSER_STOP (A9) Windows 2000/XP: Browser Stop key +const int VK_BROWSER_STOP = 0xA9; + +// VK_BROWSER_SEARCH (AA) Windows 2000/XP: Browser Search key +const int VK_BROWSER_SEARCH = 0xAA; + +// VK_BROWSER_FAVORITES (AB) Windows 2000/XP: Browser Favorites key +const int VK_BROWSER_FAVORITES = 0xAB; + +// VK_BROWSER_HOME (AC) Windows 2000/XP: Browser Start and Home key +const int VK_BROWSER_HOME = 0xAC; + +// VK_VOLUME_MUTE (AD) Windows 2000/XP: Volume Mute key +const int VK_VOLUME_MUTE = 0xAD; + +// VK_VOLUME_DOWN (AE) Windows 2000/XP: Volume Down key +const int VK_VOLUME_DOWN = 0xAE; + +// VK_VOLUME_UP (AF) Windows 2000/XP: Volume Up key +const int VK_VOLUME_UP = 0xAF; + +// VK_MEDIA_NEXT_TRACK (B0) Windows 2000/XP: Next Track key +const int VK_MEDIA_NEXT_TRACK = 0xB0; + +// VK_MEDIA_PREV_TRACK (B1) Windows 2000/XP: Previous Track key +const int VK_MEDIA_PREV_TRACK = 0xB1; + +// VK_MEDIA_STOP (B2) Windows 2000/XP: Stop Media key +const int VK_MEDIA_STOP = 0xB2; + +// VK_MEDIA_PLAY_PAUSE (B3) Windows 2000/XP: Play/Pause Media key +const int VK_MEDIA_PLAY_PAUSE = 0xB3; + +// VK_LAUNCH_MAIL (B4) Windows 2000/XP: Start Mail key +const int VK_MEDIA_LAUNCH_MAIL = 0xB4; + +// VK_LAUNCH_MEDIA_SELECT (B5) Windows 2000/XP: Select Media key +const int VK_MEDIA_LAUNCH_MEDIA_SELECT = 0xB5; + +// VK_LAUNCH_APP1 (B6) Windows 2000/XP: Start Application 1 key +const int VK_MEDIA_LAUNCH_APP1 = 0xB6; + +// VK_LAUNCH_APP2 (B7) Windows 2000/XP: Start Application 2 key +const int VK_MEDIA_LAUNCH_APP2 = 0xB7; + +// VK_OEM_1 (BA) Used for miscellaneous characters; it can vary by keyboard. Windows 2000/XP: For the US standard keyboard, the ';:' key +const int VK_OEM_1 = 0xBA; + +// VK_OEM_PLUS (BB) Windows 2000/XP: For any country/region, the '+' key +const int VK_OEM_PLUS = 0xBB; + +// VK_OEM_COMMA (BC) Windows 2000/XP: For any country/region, the ',' key +const int VK_OEM_COMMA = 0xBC; + +// VK_OEM_MINUS (BD) Windows 2000/XP: For any country/region, the '-' key +const int VK_OEM_MINUS = 0xBD; + +// VK_OEM_PERIOD (BE) Windows 2000/XP: For any country/region, the '.' key +const int VK_OEM_PERIOD = 0xBE; + +// VK_OEM_2 (BF) Used for miscellaneous characters; it can vary by keyboard. Windows 2000/XP: For the US standard keyboard, the '/?' key +const int VK_OEM_2 = 0xBF; + +// VK_OEM_3 (C0) Used for miscellaneous characters; it can vary by keyboard. Windows 2000/XP: For the US standard keyboard, the '`~' key +const int VK_OEM_3 = 0xC0; + +// VK_OEM_4 (DB) Used for miscellaneous characters; it can vary by keyboard. Windows 2000/XP: For the US standard keyboard, the '[{' key +const int VK_OEM_4 = 0xDB; + +// VK_OEM_5 (DC) Used for miscellaneous characters; it can vary by keyboard. Windows 2000/XP: For the US standard keyboard, the '\|' key +const int VK_OEM_5 = 0xDC; + +// VK_OEM_6 (DD) Used for miscellaneous characters; it can vary by keyboard. Windows 2000/XP: For the US standard keyboard, the ']}' key +const int VK_OEM_6 = 0xDD; + +// 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 +const int VK_OEM_7 = 0xDE; + +// VK_OEM_8 (DF) Used for miscellaneous characters; it can vary by keyboard. +const int VK_OEM_8 = 0xDF; + +// VK_OEM_102 (E2) Windows 2000/XP: Either the angle bracket key or the backslash key on the RT 102-key keyboard +const int VK_OEM_102 = 0xE2; + +// VK_PROCESSKEY (E5) Windows 95/98/Me, Windows NT 4.0, Windows 2000/XP: IME PROCESS key +const int VK_PROCESSKEY = 0xE5; + +// 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 +const int VK_PACKET = 0xE7; + +// VK_ATTN (F6) Attn key +const int VK_ATTN = 0xF6; + +// VK_CRSEL (F7) CrSel key +const int VK_CRSEL = 0xF7; + +// VK_EXSEL (F8) ExSel key +const int VK_EXSEL = 0xF8; + +// VK_EREOF (F9) Erase EOF key +const int VK_EREOF = 0xF9; + +// VK_PLAY (FA) Play key +const int VK_PLAY = 0xFA; + +// VK_ZOOM (FB) Zoom key +const int VK_ZOOM = 0xFB; + +// VK_NONAME (FC) Reserved for future use +const int VK_NONAME = 0xFC; + +// VK_PA1 (FD) PA1 key +const int VK_PA1 = 0xFD; + +// VK_OEM_CLEAR (FE) Clear key +const int VK_OEM_CLEAR = 0xFE; + +const int VK_UNKNOWN = 0; + +} + +#endif |