summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--webkit/glue/editor_client_impl.cc197
-rw-r--r--webkit/glue/event_conversion.cc106
-rw-r--r--webkit/port/platform/chromium/KeyCodeConversionGtk.cpp312
-rw-r--r--webkit/port/platform/chromium/KeyboardCodes.h570
-rw-r--r--webkit/port/platform/chromium/KeyboardCodesPosix.h547
-rw-r--r--webkit/port/platform/chromium/KeyboardCodesWin.h552
-rw-r--r--webkit/port/platform/chromium/PopupMenuChromium.cpp24
-rw-r--r--webkit/tools/test_shell/SConscript3
-rw-r--r--webkit/tools/test_shell/keyboard_unittest.cc9
9 files changed, 1455 insertions, 865 deletions
diff --git a/webkit/glue/editor_client_impl.cc b/webkit/glue/editor_client_impl.cc
index e6f4b831..0f7c8f2 100644
--- a/webkit/glue/editor_client_impl.cc
+++ b/webkit/glue/editor_client_impl.cc
@@ -15,11 +15,9 @@ MSVC_PUSH_WARNING_LEVEL(0);
#include "Editor.h"
#include "EventHandler.h"
#include "EventNames.h"
+#include "KeyboardCodes.h"
#include "HTMLInputElement.h"
#include "Frame.h"
-#if defined(OS_MACOSX) || defined(OS_LINUX)
-#include "KeyboardCodes.h"
-#endif
#include "KeyboardEvent.h"
#include "PlatformKeyboardEvent.h"
#include "PlatformString.h"
@@ -400,109 +398,114 @@ namespace key_lookup_table {
using namespace WebCore;
static const KeyDownEntry keyDownEntries[] = {
- { VK_LEFT, 0, "MoveLeft" },
- { VK_LEFT, ShiftKey, "MoveLeftAndModifySelection" },
-#if defined(OS_WIN)
- { VK_LEFT, CtrlKey, "MoveWordLeft" },
- { VK_LEFT, CtrlKey | ShiftKey, "MoveWordLeftAndModifySelection" },
-#elif defined(OS_MACOSX)
- { VK_LEFT, OptionKey, "MoveWordLeft" },
- { VK_LEFT, OptionKey | ShiftKey, "MoveWordLeftAndModifySelection" },
+ { WebCore::VKEY_LEFT, 0, "MoveLeft" },
+ { WebCore::VKEY_LEFT, ShiftKey, "MoveLeftAndModifySelection" },
+#if defined(OS_MACOSX)
+ { WebCore::VKEY_LEFT, OptionKey, "MoveWordLeft" },
+ { WebCore::VKEY_LEFT, OptionKey | ShiftKey,
+ "MoveWordLeftAndModifySelection" },
+#else
+ { WebCore::VKEY_LEFT, CtrlKey, "MoveWordLeft" },
+ { WebCore::VKEY_LEFT, CtrlKey | ShiftKey, "MoveWordLeftAndModifySelection"},
#endif
- { VK_RIGHT, 0, "MoveRight" },
- { VK_RIGHT, ShiftKey, "MoveRightAndModifySelection" },
-#if defined(OS_WIN)
- { VK_RIGHT, CtrlKey, "MoveWordRight" },
- { VK_RIGHT, CtrlKey | ShiftKey, "MoveWordRightAndModifySelection" },
-#elif defined(OS_MACOSX)
- { VK_RIGHT, OptionKey, "MoveWordRight" },
- { VK_RIGHT, OptionKey | ShiftKey, "MoveWordRightAndModifySelection" },
+ { WebCore::VKEY_RIGHT, 0, "MoveRight" },
+ { WebCore::VKEY_RIGHT, ShiftKey, "MoveRightAndModifySelection" },
+#if defined(OS_MACOSX)
+ { WebCore::VKEY_RIGHT, OptionKey, "MoveWordRight" },
+ { WebCore::VKEY_RIGHT, OptionKey | ShiftKey,
+ "MoveWordRightAndModifySelection" },
+#else
+ { WebCore::VKEY_RIGHT, CtrlKey, "MoveWordRight" },
+ { WebCore::VKEY_RIGHT, CtrlKey | ShiftKey,
+ "MoveWordRightAndModifySelection" },
#endif
-
- { VK_UP, 0, "MoveUp" },
- { VK_UP, ShiftKey, "MoveUpAndModifySelection" },
- { VK_PRIOR, ShiftKey, "MovePageUpAndModifySelection" },
- { VK_DOWN, 0, "MoveDown" },
- { VK_DOWN, ShiftKey, "MoveDownAndModifySelection" },
- { VK_NEXT, ShiftKey, "MovePageDownAndModifySelection" },
- { VK_PRIOR, 0, "MovePageUp" },
- { VK_NEXT, 0, "MovePageDown" },
- { VK_HOME, 0, "MoveToBeginningOfLine" },
- { VK_HOME, ShiftKey, "MoveToBeginningOfLineAndModifySelection" },
+ { WebCore::VKEY_UP, 0, "MoveUp" },
+ { WebCore::VKEY_UP, ShiftKey, "MoveUpAndModifySelection" },
+ { WebCore::VKEY_PRIOR, ShiftKey, "MovePageUpAndModifySelection" },
+ { WebCore::VKEY_DOWN, 0, "MoveDown" },
+ { WebCore::VKEY_DOWN, ShiftKey, "MoveDownAndModifySelection" },
+ { WebCore::VKEY_NEXT, ShiftKey, "MovePageDownAndModifySelection"},
+ { WebCore::VKEY_PRIOR, 0, "MovePageUp" },
+ { WebCore::VKEY_NEXT, 0, "MovePageDown" },
+ { WebCore::VKEY_HOME, 0, "MoveToBeginningOfLine" },
+ { WebCore::VKEY_HOME, ShiftKey,
+ "MoveToBeginningOfLineAndModifySelection" },
#if defined(OS_MACOSX)
- { VK_LEFT, CommandKey, "MoveToBeginningOfLine" },
- { VK_LEFT, CommandKey | ShiftKey, "MoveToBeginningOfLineAndModifySelection" },
+ { WebCore::VKEY_LEFT, CommandKey, "MoveToBeginningOfLine" },
+ { WebCore::VKEY_LEFT, CommandKey | ShiftKey,
+ "MoveToBeginningOfLineAndModifySelection" },
#endif
-
-#if defined(OS_WIN)
- { VK_HOME, CtrlKey, "MoveToBeginningOfDocument" },
- { VK_HOME, CtrlKey | ShiftKey, "MoveToBeginningOfDocumentAndModifySelection" },
-#elif defined(OS_MACOSX)
- { VK_UP, CommandKey, "MoveToBeginningOfDocument" },
- { VK_UP, CommandKey | ShiftKey, "MoveToBeginningOfDocumentAndModifySelection" },
+#if defined(OS_MACOSX)
+ { WebCore::VKEY_UP, CommandKey, "MoveToBeginningOfDocument" },
+ { WebCore::VKEY_UP, CommandKey | ShiftKey,
+ "MoveToBeginningOfDocumentAndModifySelection" },
+#else
+ { WebCore::VKEY_HOME, CtrlKey, "MoveToBeginningOfDocument" },
+ { WebCore::VKEY_HOME, CtrlKey | ShiftKey,
+ "MoveToBeginningOfDocumentAndModifySelection" },
#endif
-
- { VK_END, 0, "MoveToEndOfLine" },
- { VK_END, ShiftKey, "MoveToEndOfLineAndModifySelection" },
+ { WebCore::VKEY_END, 0, "MoveToEndOfLine" },
+ { WebCore::VKEY_END, ShiftKey,
+ "MoveToEndOfLineAndModifySelection" },
#if defined(OS_MACOSX)
- { VK_RIGHT, CommandKey, "MoveToEndOfLine" },
- { VK_RIGHT, CommandKey | ShiftKey, "MoveToEndOfLineAndModifySelection" },
+ { WebCore::VKEY_DOWN, CommandKey, "MoveToEndOfDocument" },
+ { WebCore::VKEY_DOWN, CommandKey | ShiftKey,
+ "MoveToEndOfDocumentAndModifySelection" },
+#else
+ { WebCore::VKEY_END, CtrlKey, "MoveToEndOfDocument" },
+ { WebCore::VKEY_END, CtrlKey | ShiftKey,
+ "MoveToEndOfDocumentAndModifySelection" },
#endif
-
-#if defined(OS_WIN)
- { VK_END, CtrlKey, "MoveToEndOfDocument" },
- { VK_END, CtrlKey | ShiftKey, "MoveToEndOfDocumentAndModifySelection" },
-#elif defined(OS_MACOSX)
- { VK_DOWN, CommandKey, "MoveToEndOfDocument" },
- { VK_DOWN, CommandKey | ShiftKey, "MoveToEndOfDocumentAndModifySelection" },
+#if defined(OS_MACOSX)
+ { WebCore::VKEY_RIGHT, CommandKey, "MoveToEndOfLine" },
+ { WebCore::VKEY_RIGHT, CommandKey | ShiftKey,
+ "MoveToEndOfLineAndModifySelection" },
#endif
-
- { VK_BACK, 0, "DeleteBackward" },
- { VK_BACK, ShiftKey, "DeleteBackward" },
- { VK_DELETE, 0, "DeleteForward" },
-#if defined(OS_WIN)
- { VK_BACK, CtrlKey, "DeleteWordBackward" },
- { VK_DELETE, CtrlKey, "DeleteWordForward" },
-#elif defined(OS_MACOSX)
- { VK_BACK, OptionKey, "DeleteWordBackward" },
- { VK_DELETE, OptionKey, "DeleteWordForward" },
+ { WebCore::VKEY_BACK, 0, "DeleteBackward" },
+ { WebCore::VKEY_BACK, ShiftKey, "DeleteBackward" },
+ { WebCore::VKEY_DELETE, 0, "DeleteForward" },
+#if defined(OS_MACOSX)
+ { WebCore::VKEY_BACK, OptionKey, "DeleteWordBackward" },
+ { WebCore::VKEY_DELETE, OptionKey, "DeleteWordForward" },
+#else
+ { WebCore::VKEY_BACK, CtrlKey, "DeleteWordBackward" },
+ { WebCore::VKEY_DELETE, CtrlKey, "DeleteWordForward" },
#endif
-
- { 'B', CtrlKey, "ToggleBold" },
- { 'I', CtrlKey, "ToggleItalic" },
- { 'U', CtrlKey, "ToggleUnderline" },
-
-
- { VK_ESCAPE, 0, "Cancel" },
- { VK_OEM_PERIOD, CtrlKey, "Cancel" },
- { VK_TAB, 0, "InsertTab" },
- { VK_TAB, ShiftKey, "InsertBacktab" },
- { VK_RETURN, 0, "InsertNewline" },
- { VK_RETURN, CtrlKey, "InsertNewline" },
- { VK_RETURN, AltKey, "InsertNewline" },
- { VK_RETURN, AltKey | ShiftKey, "InsertNewline" },
- { VK_RETURN, ShiftKey, "InsertLineBreak" },
-
-#if defined(OS_WIN)
- { VK_INSERT, CtrlKey, "Copy" },
- { VK_INSERT, ShiftKey, "Paste" },
- { VK_DELETE, ShiftKey, "Cut" },
- { 'C', CtrlKey, "Copy" },
- { 'V', CtrlKey, "Paste" },
- { 'V', CtrlKey | ShiftKey, "PasteAndMatchStyle" },
- { 'X', CtrlKey, "Cut" },
- { 'A', CtrlKey, "SelectAll" },
- { 'Z', CtrlKey, "Undo" },
- { 'Z', CtrlKey | ShiftKey, "Redo" },
- { 'Y', CtrlKey, "Redo" },
-#elif defined(OS_MACOSX)
- { 'C', CommandKey, "Copy" },
- { 'V', CommandKey, "Paste" },
- { 'V', CommandKey | ShiftKey, "PasteAndMatchStyle" },
- { 'X', CommandKey, "Cut" },
- { 'A', CommandKey, "SelectAll" },
- { 'Z', CommandKey, "Undo" },
- { 'Z', CommandKey | ShiftKey, "Redo" },
+ { 'B', CtrlKey, "ToggleBold" },
+ { 'I', CtrlKey, "ToggleItalic" },
+ { 'U', CtrlKey, "ToggleUnderline" },
+ { WebCore::VKEY_ESCAPE, 0, "Cancel" },
+ { WebCore::VKEY_OEM_PERIOD, CtrlKey, "Cancel" },
+ { WebCore::VKEY_TAB, 0, "InsertTab" },
+ { WebCore::VKEY_TAB, ShiftKey, "InsertBacktab" },
+ { WebCore::VKEY_RETURN, 0, "InsertNewline" },
+ { WebCore::VKEY_RETURN, CtrlKey, "InsertNewline" },
+ { WebCore::VKEY_RETURN, AltKey, "InsertNewline" },
+ { WebCore::VKEY_RETURN, AltKey | ShiftKey, "InsertNewline" },
+ { WebCore::VKEY_RETURN, ShiftKey, "InsertLineBreak" },
+ { WebCore::VKEY_INSERT, CtrlKey, "Copy" },
+ { WebCore::VKEY_INSERT, ShiftKey, "Paste" },
+ { WebCore::VKEY_DELETE, ShiftKey, "Cut" },
+#if defined(OS_MACOSX)
+ { 'C', CommandKey, "Copy" },
+ { 'V', CommandKey, "Paste" },
+ { 'V', CommandKey | ShiftKey,
+ "PasteAndMatchStyle" },
+ { 'X', CommandKey, "Cut" },
+ { 'A', CommandKey, "SelectAll" },
+ { 'Z', CommandKey, "Undo" },
+ { 'Z', CommandKey | ShiftKey,
+ "Redo" },
+ { 'Y', CommandKey, "Redo" },
+#else
+ { 'C', CtrlKey, "Copy" },
+ { 'V', CtrlKey, "Paste" },
+ { 'V', CtrlKey | ShiftKey, "PasteAndMatchStyle" },
+ { 'X', CtrlKey, "Cut" },
+ { 'A', CtrlKey, "SelectAll" },
+ { 'Z', CtrlKey, "Undo" },
+ { 'Z', CtrlKey | ShiftKey, "Redo" },
+ { 'Y', CtrlKey, "Redo" },
#endif
};
diff --git a/webkit/glue/event_conversion.cc b/webkit/glue/event_conversion.cc
index 517b870..981391a 100644
--- a/webkit/glue/event_conversion.cc
+++ b/webkit/glue/event_conversion.cc
@@ -6,13 +6,7 @@
#include "base/compiler_specific.h"
-#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
MSVC_PUSH_WARNING_LEVEL(0);
@@ -146,101 +140,101 @@ static inline String ToSingleCharacterString(UChar c) {
static String GetKeyIdentifierForWindowsKeyCode(unsigned short keyCode) {
switch (keyCode) {
- case VK_MENU:
+ case VKEY_MENU:
return "Alt";
- case VK_CONTROL:
+ case VKEY_CONTROL:
return "Control";
- case VK_SHIFT:
+ case VKEY_SHIFT:
return "Shift";
- case VK_CAPITAL:
+ case VKEY_CAPITAL:
return "CapsLock";
- case VK_LWIN:
- case VK_RWIN:
+ case VKEY_LWIN:
+ case VKEY_RWIN:
return "Win";
- case VK_CLEAR:
+ case VKEY_CLEAR:
return "Clear";
- case VK_DOWN:
+ case VKEY_DOWN:
return "Down";
// "End"
- case VK_END:
+ case VKEY_END:
return "End";
// "Enter"
- case VK_RETURN:
+ case VKEY_RETURN:
return "Enter";
- case VK_EXECUTE:
+ case VKEY_EXECUTE:
return "Execute";
- case VK_F1:
+ case VKEY_F1:
return "F1";
- case VK_F2:
+ case VKEY_F2:
return "F2";
- case VK_F3:
+ case VKEY_F3:
return "F3";
- case VK_F4:
+ case VKEY_F4:
return "F4";
- case VK_F5:
+ case VKEY_F5:
return "F5";
- case VK_F6:
+ case VKEY_F6:
return "F6";
- case VK_F7:
+ case VKEY_F7:
return "F7";
- case VK_F8:
+ case VKEY_F8:
return "F8";
- case VK_F9:
+ case VKEY_F9:
return "F9";
- case VK_F10:
+ case VKEY_F10:
return "F11";
- case VK_F12:
+ case VKEY_F12:
return "F12";
- case VK_F13:
+ case VKEY_F13:
return "F13";
- case VK_F14:
+ case VKEY_F14:
return "F14";
- case VK_F15:
+ case VKEY_F15:
return "F15";
- case VK_F16:
+ case VKEY_F16:
return "F16";
- case VK_F17:
+ case VKEY_F17:
return "F17";
- case VK_F18:
+ case VKEY_F18:
return "F18";
- case VK_F19:
+ case VKEY_F19:
return "F19";
- case VK_F20:
+ case VKEY_F20:
return "F20";
- case VK_F21:
+ case VKEY_F21:
return "F21";
- case VK_F22:
+ case VKEY_F22:
return "F22";
- case VK_F23:
+ case VKEY_F23:
return "F23";
- case VK_F24:
+ case VKEY_F24:
return "F24";
- case VK_HELP:
+ case VKEY_HELP:
return "Help";
- case VK_HOME:
+ case VKEY_HOME:
return "Home";
- case VK_INSERT:
+ case VKEY_INSERT:
return "Insert";
- case VK_LEFT:
+ case VKEY_LEFT:
return "Left";
- case VK_NEXT:
+ case VKEY_NEXT:
return "PageDown";
- case VK_PRIOR:
+ case VKEY_PRIOR:
return "PageUp";
- case VK_PAUSE:
+ case VKEY_PAUSE:
return "Pause";
- case VK_SNAPSHOT:
+ case VKEY_SNAPSHOT:
return "PrintScreen";
- case VK_RIGHT:
+ case VKEY_RIGHT:
return "Right";
- case VK_SCROLL:
+ case VKEY_SCROLL:
return "Scroll";
- case VK_SELECT:
+ case VKEY_SELECT:
return "Select";
- case VK_UP:
+ case VKEY_UP:
return "Up";
// Standard says that DEL becomes U+007F.
- case VK_DELETE:
+ case VKEY_DELETE:
return "U+007F";
default:
return String::format("U+%04X", toupper(keyCode));
@@ -323,10 +317,8 @@ void MakePlatformKeyboardEvent::SetKeyType(Type type) {
// which don't have associated character events.
bool MakePlatformKeyboardEvent::IsCharacterKey() const {
switch (windowsVirtualKeyCode()) {
-#if defined(OS_WIN)
- case VK_BACK:
- case VK_ESCAPE:
-#endif
+ case VKEY_BACK:
+ case VKEY_ESCAPE:
return false;
default:
diff --git a/webkit/port/platform/chromium/KeyCodeConversionGtk.cpp b/webkit/port/platform/chromium/KeyCodeConversionGtk.cpp
index 8c1aef7..4808d7f 100644
--- a/webkit/port/platform/chromium/KeyCodeConversionGtk.cpp
+++ b/webkit/port/platform/chromium/KeyCodeConversionGtk.cpp
@@ -40,320 +40,320 @@ int windowsKeyCodeForKeyEvent(unsigned int keycode)
{
switch (keycode) {
case GDK_KP_0:
- return VK_NUMPAD0;// (60) Numeric keypad 0 key
+ return VKEY_NUMPAD0;// (60) Numeric keypad 0 key
case GDK_KP_1:
- return VK_NUMPAD1;// (61) Numeric keypad 1 key
+ return VKEY_NUMPAD1;// (61) Numeric keypad 1 key
case GDK_KP_2:
- return VK_NUMPAD2; // (62) Numeric keypad 2 key
+ return VKEY_NUMPAD2; // (62) Numeric keypad 2 key
case GDK_KP_3:
- return VK_NUMPAD3; // (63) Numeric keypad 3 key
+ return VKEY_NUMPAD3; // (63) Numeric keypad 3 key
case GDK_KP_4:
- return VK_NUMPAD4; // (64) Numeric keypad 4 key
+ return VKEY_NUMPAD4; // (64) Numeric keypad 4 key
case GDK_KP_5:
- return VK_NUMPAD5; //(65) Numeric keypad 5 key
+ return VKEY_NUMPAD5; //(65) Numeric keypad 5 key
case GDK_KP_6:
- return VK_NUMPAD6; // (66) Numeric keypad 6 key
+ return VKEY_NUMPAD6; // (66) Numeric keypad 6 key
case GDK_KP_7:
- return VK_NUMPAD7; // (67) Numeric keypad 7 key
+ return VKEY_NUMPAD7; // (67) Numeric keypad 7 key
case GDK_KP_8:
- return VK_NUMPAD8; // (68) Numeric keypad 8 key
+ return VKEY_NUMPAD8; // (68) Numeric keypad 8 key
case GDK_KP_9:
- return VK_NUMPAD9; // (69) Numeric keypad 9 key
+ return VKEY_NUMPAD9; // (69) Numeric keypad 9 key
case GDK_KP_Multiply:
- return VK_MULTIPLY; // (6A) Multiply key
+ return VKEY_MULTIPLY; // (6A) Multiply key
case GDK_KP_Add:
- return VK_ADD; // (6B) Add key
+ return VKEY_ADD; // (6B) Add key
case GDK_KP_Subtract:
- return VK_SUBTRACT; // (6D) Subtract key
+ return VKEY_SUBTRACT; // (6D) Subtract key
case GDK_KP_Decimal:
- return VK_DECIMAL; // (6E) Decimal key
+ return VKEY_DECIMAL; // (6E) Decimal key
case GDK_KP_Divide:
- return VK_DIVIDE; // (6F) Divide key
+ return VKEY_DIVIDE; // (6F) Divide key
case GDK_BackSpace:
- return VK_BACK; // (08) BACKSPACE key
+ return VKEY_BACK; // (08) BACKSPACE key
case GDK_ISO_Left_Tab:
case GDK_3270_BackTab:
case GDK_Tab:
- return VK_TAB; // (09) TAB key
+ return VKEY_TAB; // (09) TAB key
case GDK_Clear:
- return VK_CLEAR; // (0C) CLEAR key
+ return VKEY_CLEAR; // (0C) CLEAR key
case GDK_ISO_Enter:
case GDK_KP_Enter:
case GDK_Return:
- return VK_RETURN; //(0D) Return key
+ return VKEY_RETURN; //(0D) Return key
case GDK_Shift_L:
case GDK_Shift_R:
- return VK_SHIFT; // (10) SHIFT key
+ return VKEY_SHIFT; // (10) SHIFT key
case GDK_Control_L:
case GDK_Control_R:
- return VK_CONTROL; // (11) CTRL key
+ return VKEY_CONTROL; // (11) CTRL key
case GDK_Menu:
case GDK_Alt_L:
case GDK_Alt_R:
- return VK_MENU; // (12) ALT key
+ return VKEY_MENU; // (12) ALT key
case GDK_Pause:
- return VK_PAUSE; // (13) PAUSE key
+ return VKEY_PAUSE; // (13) PAUSE key
case GDK_Caps_Lock:
- return VK_CAPITAL; // (14) CAPS LOCK key
+ return VKEY_CAPITAL; // (14) CAPS LOCK key
case GDK_Kana_Lock:
case GDK_Kana_Shift:
- return VK_KANA; // (15) Input Method Editor (IME) Kana mode
+ return VKEY_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
+ return VKEY_HANGUL; // VKEY_HANGUL (15) IME Hangul mode
+ // VKEY_JUNJA (17) IME Junja mode
+ // VKEY_FINAL (18) IME final mode
case GDK_Hangul_Hanja:
- return VK_HANJA; // (19) IME Hanja mode
+ return VKEY_HANJA; // (19) IME Hanja mode
case GDK_Kanji:
- return VK_KANJI; // (19) IME Kanji mode
+ return VKEY_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
+ return VKEY_ESCAPE; // (1B) ESC key
+ // VKEY_CONVERT (1C) IME convert
+ // VKEY_NONCONVERT (1D) IME nonconvert
+ // VKEY_ACCEPT (1E) IME accept
+ // VKEY_MODECHANGE (1F) IME mode change request
case GDK_space:
- return VK_SPACE; // (20) SPACEBAR
+ return VKEY_SPACE; // (20) SPACEBAR
case GDK_Page_Up:
- return VK_PRIOR; // (21) PAGE UP key
+ return VKEY_PRIOR; // (21) PAGE UP key
case GDK_Page_Down:
- return VK_NEXT; // (22) PAGE DOWN key
+ return VKEY_NEXT; // (22) PAGE DOWN key
case GDK_End:
- return VK_END; // (23) END key
+ return VKEY_END; // (23) END key
case GDK_Home:
- return VK_HOME; // (24) HOME key
+ return VKEY_HOME; // (24) HOME key
case GDK_Left:
- return VK_LEFT; // (25) LEFT ARROW key
+ return VKEY_LEFT; // (25) LEFT ARROW key
case GDK_Up:
- return VK_UP; // (26) UP ARROW key
+ return VKEY_UP; // (26) UP ARROW key
case GDK_Right:
- return VK_RIGHT; // (27) RIGHT ARROW key
+ return VKEY_RIGHT; // (27) RIGHT ARROW key
case GDK_Down:
- return VK_DOWN; // (28) DOWN ARROW key
+ return VKEY_DOWN; // (28) DOWN ARROW key
case GDK_Select:
- return VK_SELECT; // (29) SELECT key
+ return VKEY_SELECT; // (29) SELECT key
case GDK_Print:
- return VK_PRINT; // (2A) PRINT key
+ return VKEY_PRINT; // (2A) PRINT key
case GDK_Execute:
- return VK_EXECUTE;// (2B) EXECUTE key
+ return VKEY_EXECUTE;// (2B) EXECUTE key
//dunno on this
//case GDK_PrintScreen:
- // return VK_SNAPSHOT; // (2C) PRINT SCREEN key
+ // return VKEY_SNAPSHOT; // (2C) PRINT SCREEN key
case GDK_Insert:
- return VK_INSERT; // (2D) INS key
+ return VKEY_INSERT; // (2D) INS key
case GDK_Delete:
- return VK_DELETE; // (2E) DEL key
+ return VKEY_DELETE; // (2E) DEL key
case GDK_Help:
- return VK_HELP; // (2F) HELP key
+ return VKEY_HELP; // (2F) HELP key
case GDK_0:
case GDK_parenleft:
- return VK_0; // (30) 0) key
+ return VKEY_0; // (30) 0) key
case GDK_1:
- return VK_1; // (31) 1 ! key
+ return VKEY_1; // (31) 1 ! key
case GDK_2:
case GDK_at:
- return VK_2; // (32) 2 & key
+ return VKEY_2; // (32) 2 & key
case GDK_3:
case GDK_numbersign:
- return VK_3; //case '3': case '#';
+ return VKEY_3; //case '3': case '#';
case GDK_4:
case GDK_dollar: // (34) 4 key '$';
- return VK_4;
+ return VKEY_4;
case GDK_5:
case GDK_percent:
- return VK_5; // (35) 5 key '%'
+ return VKEY_5; // (35) 5 key '%'
case GDK_6:
case GDK_asciicircum:
- return VK_6; // (36) 6 key '^'
+ return VKEY_6; // (36) 6 key '^'
case GDK_7:
case GDK_ampersand:
- return VK_7; // (37) 7 key case '&'
+ return VKEY_7; // (37) 7 key case '&'
case GDK_8:
case GDK_asterisk:
- return VK_8; // (38) 8 key '*'
+ return VKEY_8; // (38) 8 key '*'
case GDK_9:
case GDK_parenright:
- return VK_9; // (39) 9 key '('
+ return VKEY_9; // (39) 9 key '('
case GDK_a:
case GDK_A:
- return VK_A; // (41) A key case 'a': case 'A': return 0x41;
+ return VKEY_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;
+ return VKEY_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;
+ return VKEY_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;
+ return VKEY_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;
+ return VKEY_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;
+ return VKEY_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;
+ return VKEY_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;
+ return VKEY_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;
+ return VKEY_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;
+ return VKEY_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;
+ return VKEY_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;
+ return VKEY_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;
+ return VKEY_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;
+ return VKEY_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;
+ return VKEY_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;
+ return VKEY_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;
+ return VKEY_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;
+ return VKEY_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;
+ return VKEY_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;
+ return VKEY_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;
+ return VKEY_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;
+ return VKEY_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;
+ return VKEY_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;
+ return VKEY_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;
+ return VKEY_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;
+ return VKEY_Z; // (5A) Z key case 'z': case 'Z': return 0x5A;
case GDK_Meta_L:
- return VK_LWIN; // (5B) Left Windows key (Microsoft Natural keyboard)
+ return VKEY_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
+ return VKEY_RWIN; // (5C) Right Windows key (Natural keyboard)
+ // VKEY_APPS (5D) Applications key (Natural keyboard)
+ // VKEY_SLEEP (5F) Computer Sleep key
+ // VKEY_SEPARATOR (6C) Separator key
+ // VKEY_SUBTRACT (6D) Subtract key
+ // VKEY_DECIMAL (6E) Decimal key
+ // VKEY_DIVIDE (6F) Divide key
// handled by key code above
case GDK_Num_Lock:
- return VK_NUMLOCK; // (90) NUM LOCK key
+ return VKEY_NUMLOCK; // (90) NUM LOCK key
case GDK_Scroll_Lock:
- return VK_SCROLL; // (91) SCROLL LOCK key
+ return VKEY_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
+ // VKEY_LSHIFT (A0) Left SHIFT key
+ // VKEY_RSHIFT (A1) Right SHIFT key
+ // VKEY_LCONTROL (A2) Left CONTROL key
+ // VKEY_RCONTROL (A3) Right CONTROL key
+ // VKEY_LMENU (A4) Left MENU key
+ // VKEY_RMENU (A5) Right MENU key
+ // VKEY_BROWSER_BACK (A6) Windows 2000/XP: Browser Back key
+ // VKEY_BROWSER_FORWARD (A7) Windows 2000/XP: Browser Forward key
+ // VKEY_BROWSER_REFRESH (A8) Windows 2000/XP: Browser Refresh key
+ // VKEY_BROWSER_STOP (A9) Windows 2000/XP: Browser Stop key
+ // VKEY_BROWSER_SEARCH (AA) Windows 2000/XP: Browser Search key
+ // VKEY_BROWSER_FAVORITES (AB) Windows 2000/XP: Browser Favorites key
+ // VKEY_BROWSER_HOME (AC) Windows 2000/XP: Browser Start and Home key
+ // VKEY_VOLUME_MUTE (AD) Windows 2000/XP: Volume Mute key
+ // VKEY_VOLUME_DOWN (AE) Windows 2000/XP: Volume Down key
+ // VKEY_VOLUME_UP (AF) Windows 2000/XP: Volume Up key
+ // VKEY_MEDIA_NEXT_TRACK (B0) Windows 2000/XP: Next Track key
+ // VKEY_MEDIA_PREV_TRACK (B1) Windows 2000/XP: Previous Track key
+ // VKEY_MEDIA_STOP (B2) Windows 2000/XP: Stop Media key
+ // VKEY_MEDIA_PLAY_PAUSE (B3) Windows 2000/XP: Play/Pause Media key
+ // VKEY_LAUNCH_MAIL (B4) Windows 2000/XP: Start Mail key
+ // VKEY_LAUNCH_MEDIA_SELECT (B5) Windows 2000/XP: Select Media key
+ // VKEY_LAUNCH_APP1 (B6) Windows 2000/XP: Start Application 1 key
+ // VKEY_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
+ // VKEY_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
+ return VKEY_OEM_1; //case ';': case ':': return 0xBA;
+ // VKEY_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
+ return VKEY_OEM_PLUS; //case '=': case '+': return 0xBB;
+ // VKEY_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
+ return VKEY_OEM_COMMA; //case ',': case '<': return 0xBC;
+ // VKEY_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
+ return VKEY_OEM_MINUS; //case '-': case '_': return 0xBD;
+ // VKEY_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
+ return VKEY_OEM_PERIOD; //case '.': case '>': return 0xBE;
+ // VKEY_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
+ return VKEY_OEM_2; //case '/': case '?': return 0xBF;
+ // VKEY_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
+ return VKEY_OEM_3; //case '`': case '~': return 0xC0;
+ // VKEY_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
+ return VKEY_OEM_4; //case '[': case '{': return 0xDB;
+ // VKEY_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
+ return VKEY_OEM_5; //case '\\': case '|': return 0xDC;
+ // VKEY_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
+ return VKEY_OEM_6; // case ']': case '}': return 0xDD;
+ // VKEY_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
+ return VKEY_OEM_7; // case '\'': case '"': return 0xDE;
+ // VKEY_OEM_8 (DF) Used for miscellaneous characters; it can vary by keyboard.
+ // VKEY_OEM_102 (E2) Windows 2000/XP: Either the angle bracket key or the backslash key on the RT 102-key keyboard
+ // VKEY_PROCESSKEY (E5) Windows 95/98/Me, Windows NT 4.0, Windows 2000/XP: IME PROCESS key
+ // VKEY_PACKET (E7) Windows 2000/XP: Used to pass Unicode characters as if they were keystrokes. The VKEY_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
+ // VKEY_ATTN (F6) Attn key
+ // VKEY_CRSEL (F7) CrSel key
+ // VKEY_EXSEL (F8) ExSel key
+ // VKEY_EREOF (F9) Erase EOF key
+ // VKEY_PLAY (FA) Play key
+ // VKEY_ZOOM (FB) Zoom key
+ // VKEY_NONAME (FC) Reserved for future use
+ // VKEY_PA1 (FD) PA1 key
+ // VKEY_OEM_CLEAR (FE) Clear key
default:
return 0;
}
diff --git a/webkit/port/platform/chromium/KeyboardCodes.h b/webkit/port/platform/chromium/KeyboardCodes.h
index 3ad1243..3f4fa7d 100644
--- a/webkit/port/platform/chromium/KeyboardCodes.h
+++ b/webkit/port/platform/chromium/KeyboardCodes.h
@@ -1,543 +1,41 @@
-/*
- * 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.
- */
+// Copyright (c) 2008, Google 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:
+//
+// * Redistributions of source code must retain the above copyright
+// notice, this list of conditions and the following disclaimer.
+// * 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.
+// * Neither the name of Google Inc. nor the names of its
+// contributors may be used to endorse or promote products derived from
+// this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+// "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 THE COPYRIGHT
+// OWNER 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 {
+#include "config.h"
-// 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;
-
-}
+#if PLATFORM(WIN_OS)
+#include "KeyboardCodesWin.h"
+#else
+#include "KeyboardCodesPosix.h"
+#endif
#endif
diff --git a/webkit/port/platform/chromium/KeyboardCodesPosix.h b/webkit/port/platform/chromium/KeyboardCodesPosix.h
new file mode 100644
index 0000000..14344bf
--- /dev/null
+++ b/webkit/port/platform/chromium/KeyboardCodesPosix.h
@@ -0,0 +1,547 @@
+/*
+ * 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 KeyboardCodesPosix_h
+#define KeyboardCodesPosix_h
+
+namespace WebCore {
+
+enum {
+
+ // VKEY_LBUTTON (01) Left mouse button
+ // VKEY_RBUTTON (02) Right mouse button
+ // VKEY_CANCEL (03) Control-break processing
+ // VKEY_MBUTTON (04) Middle mouse button (three-button mouse)
+ // VKEY_XBUTTON1 (05)
+ // VKEY_XBUTTON2 (06)
+
+ // VKEY_BACK (08) BACKSPACE key
+ VKEY_BACK = 0x08,
+
+ // VKEY_TAB (09) TAB key
+ VKEY_TAB = 0x09,
+
+ // VKEY_CLEAR (0C) CLEAR key
+ VKEY_CLEAR = 0x0C,
+
+ // VKEY_RETURN (0D)
+ VKEY_RETURN = 0x0D,
+
+ // VKEY_SHIFT (10) SHIFT key
+ VKEY_SHIFT = 0x10,
+
+ // VKEY_CONTROL (11) CTRL key
+ VKEY_CONTROL = 0x11,
+
+ // VKEY_MENU (12) ALT key
+ VKEY_MENU = 0x12,
+
+ // VKEY_PAUSE (13) PAUSE key
+ VKEY_PAUSE = 0x13,
+
+ // VKEY_CAPITAL (14) CAPS LOCK key
+ VKEY_CAPITAL = 0x14,
+
+ // VKEY_KANA (15) Input Method Editor (IME) Kana mode
+ VKEY_KANA = 0x15,
+
+ // VKEY_HANGUEL (15) IME Hanguel mode (maintained for compatibility, use VKEY_HANGUL)
+ // VKEY_HANGUL (15) IME Hangul mode
+ VKEY_HANGUL = 0x15,
+
+ // VKEY_JUNJA (17) IME Junja mode
+ VKEY_JUNJA = 0x17,
+
+ // VKEY_FINAL (18) IME final mode
+ VKEY_FINAL = 0x18,
+
+ // VKEY_HANJA (19) IME Hanja mode
+ VKEY_HANJA = 0x19,
+
+ // VKEY_KANJI (19) IME Kanji mode
+ VKEY_KANJI = 0x19,
+
+ // VKEY_ESCAPE (1B) ESC key
+ VKEY_ESCAPE = 0x1B,
+
+ // VKEY_CONVERT (1C) IME convert
+ VKEY_CONVERT = 0x1C,
+
+ // VKEY_NONCONVERT (1D) IME nonconvert
+ VKEY_NONCONVERT = 0x1D,
+
+ // VKEY_ACCEPT (1E) IME accept
+ VKEY_ACCEPT = 0x1E,
+
+ // VKEY_MODECHANGE (1F) IME mode change request
+ VKEY_MODECHANGE = 0x1F,
+
+ // VKEY_SPACE (20) SPACEBAR
+ VKEY_SPACE = 0x20,
+
+ // VKEY_PRIOR (21) PAGE UP key
+ VKEY_PRIOR = 0x21,
+
+ // VKEY_NEXT (22) PAGE DOWN key
+ VKEY_NEXT = 0x22,
+
+ // VKEY_END (23) END key
+ VKEY_END = 0x23,
+
+ // VKEY_HOME (24) HOME key
+ VKEY_HOME = 0x24,
+
+ // VKEY_LEFT (25) LEFT ARROW key
+ VKEY_LEFT = 0x25,
+
+ // VKEY_UP (26) UP ARROW key
+ VKEY_UP = 0x26,
+
+ // VKEY_RIGHT (27) RIGHT ARROW key
+ VKEY_RIGHT = 0x27,
+
+ // VKEY_DOWN (28) DOWN ARROW key
+ VKEY_DOWN = 0x28,
+
+ // VKEY_SELECT (29) SELECT key
+ VKEY_SELECT = 0x29,
+
+ // VKEY_PRINT (2A) PRINT key
+ VKEY_PRINT = 0x2A,
+
+ // VKEY_EXECUTE (2B) EXECUTE key
+ VKEY_EXECUTE = 0x2B,
+
+ // VKEY_SNAPSHOT (2C) PRINT SCREEN key
+ VKEY_SNAPSHOT = 0x2C,
+
+ // VKEY_INSERT (2D) INS key
+ VKEY_INSERT = 0x2D,
+
+ // VKEY_DELETE (2E) DEL key
+ VKEY_DELETE = 0x2E,
+
+ // VKEY_HELP (2F) HELP key
+ VKEY_HELP = 0x2F,
+
+ // (30) 0 key
+ VKEY_0 = 0x30,
+
+ // (31) 1 key
+ VKEY_1 = 0x31,
+
+ // (32) 2 key
+ VKEY_2 = 0x32,
+
+ // (33) 3 key
+ VKEY_3 = 0x33,
+
+ // (34) 4 key
+ VKEY_4 = 0x34,
+
+ // (35) 5 key,
+
+ VKEY_5 = 0x35,
+
+ // (36) 6 key
+ VKEY_6 = 0x36,
+
+ // (37) 7 key
+ VKEY_7 = 0x37,
+
+ // (38) 8 key
+ VKEY_8 = 0x38,
+
+ // (39) 9 key
+ VKEY_9 = 0x39,
+
+ // (41) A key
+ VKEY_A = 0x41,
+
+ // (42) B key
+ VKEY_B = 0x42,
+
+ // (43) C key
+ VKEY_C = 0x43,
+
+ // (44) D key
+ VKEY_D = 0x44,
+
+ // (45) E key
+ VKEY_E = 0x45,
+
+ // (46) F key
+ VKEY_F = 0x46,
+
+ // (47) G key
+ VKEY_G = 0x47,
+
+ // (48) H key
+ VKEY_H = 0x48,
+
+ // (49) I key
+ VKEY_I = 0x49,
+
+ // (4A) J key
+ VKEY_J = 0x4A,
+
+ // (4B) K key
+ VKEY_K = 0x4B,
+
+ // (4C) L key
+ VKEY_L = 0x4C,
+
+ // (4D) M key
+ VKEY_M = 0x4D,
+
+ // (4E) N key
+ VKEY_N = 0x4E,
+
+ // (4F) O key
+ VKEY_O = 0x4F,
+
+ // (50) P key
+ VKEY_P = 0x50,
+
+ // (51) Q key
+ VKEY_Q = 0x51,
+
+ // (52) R key
+ VKEY_R = 0x52,
+
+ // (53) S key
+ VKEY_S = 0x53,
+
+ // (54) T key
+ VKEY_T = 0x54,
+
+ // (55) U key
+ VKEY_U = 0x55,
+
+ // (56) V key
+ VKEY_V = 0x56,
+
+ // (57) W key
+ VKEY_W = 0x57,
+
+ // (58) X key
+ VKEY_X = 0x58,
+
+ // (59) Y key
+ VKEY_Y = 0x59,
+
+ // (5A) Z key
+ VKEY_Z = 0x5A,
+
+ // VKEY_LWIN (5B) Left Windows key (Microsoft Natural keyboard)
+ VKEY_LWIN = 0x5B,
+
+ // VKEY_RWIN (5C) Right Windows key (Natural keyboard)
+ VKEY_RWIN = 0x5C,
+
+ // VKEY_APPS (5D) Applications key (Natural keyboard)
+ VKEY_APPS = 0x5D,
+
+ // VKEY_SLEEP (5F) Computer Sleep key
+ VKEY_SLEEP = 0x5F,
+
+ // VKEY_NUMPAD0 (60) Numeric keypad 0 key
+ VKEY_NUMPAD0 = 0x60,
+
+ // VKEY_NUMPAD1 (61) Numeric keypad 1 key
+ VKEY_NUMPAD1 = 0x61,
+
+ // VKEY_NUMPAD2 (62) Numeric keypad 2 key
+ VKEY_NUMPAD2 = 0x62,
+
+ // VKEY_NUMPAD3 (63) Numeric keypad 3 key
+ VKEY_NUMPAD3 = 0x63,
+
+ // VKEY_NUMPAD4 (64) Numeric keypad 4 key
+ VKEY_NUMPAD4 = 0x64,
+
+ // VKEY_NUMPAD5 (65) Numeric keypad 5 key
+ VKEY_NUMPAD5 = 0x65,
+
+ // VKEY_NUMPAD6 (66) Numeric keypad 6 key
+ VKEY_NUMPAD6 = 0x66,
+
+ // VKEY_NUMPAD7 (67) Numeric keypad 7 key
+ VKEY_NUMPAD7 = 0x67,
+
+ // VKEY_NUMPAD8 (68) Numeric keypad 8 key
+ VKEY_NUMPAD8 = 0x68,
+
+ // VKEY_NUMPAD9 (69) Numeric keypad 9 key
+ VKEY_NUMPAD9 = 0x69,
+
+ // VKEY_MULTIPLY (6A) Multiply key
+ VKEY_MULTIPLY = 0x6A,
+
+ // VKEY_ADD (6B) Add key
+ VKEY_ADD = 0x6B,
+
+ // VKEY_SEPARATOR (6C) Separator key
+ VKEY_SEPARATOR = 0x6C,
+
+ // VKEY_SUBTRACT (6D) Subtract key
+ VKEY_SUBTRACT = 0x6D,
+
+ // VKEY_DECIMAL (6E) Decimal key
+ VKEY_DECIMAL = 0x6E,
+
+ // VKEY_DIVIDE (6F) Divide key
+ VKEY_DIVIDE = 0x6F,
+
+ // VKEY_F1 (70) F1 key
+ VKEY_F1 = 0x70,
+
+ // VKEY_F2 (71) F2 key
+ VKEY_F2 = 0x71,
+
+ // VKEY_F3 (72) F3 key
+ VKEY_F3 = 0x72,
+
+ // VKEY_F4 (73) F4 key
+ VKEY_F4 = 0x73,
+
+ // VKEY_F5 (74) F5 key
+ VKEY_F5 = 0x74,
+
+ // VKEY_F6 (75) F6 key
+ VKEY_F6 = 0x75,
+
+ // VKEY_F7 (76) F7 key
+ VKEY_F7 = 0x76,
+
+ // VKEY_F8 (77) F8 key
+ VKEY_F8 = 0x77,
+
+ // VKEY_F9 (78) F9 key
+ VKEY_F9 = 0x78,
+
+ // VKEY_F10 (79) F10 key
+ VKEY_F10 = 0x79,
+
+ // VKEY_F11 (7A) F11 key
+ VKEY_F11 = 0x7A,
+
+ // VKEY_F12 (7B) F12 key
+ VKEY_F12 = 0x7B,
+
+ // VKEY_F13 (7C) F13 key
+ VKEY_F13 = 0x7C,
+
+ // VKEY_F14 (7D) F14 key
+ VKEY_F14 = 0x7D,
+
+ // VKEY_F15 (7E) F15 key
+ VKEY_F15 = 0x7E,
+
+ // VKEY_F16 (7F) F16 key
+ VKEY_F16 = 0x7F,
+
+ // VKEY_F17 (80H) F17 key
+ VKEY_F17 = 0x80,
+
+ // VKEY_F18 (81H) F18 key
+ VKEY_F18 = 0x81,
+
+ // VKEY_F19 (82H) F19 key
+ VKEY_F19 = 0x82,
+
+ // VKEY_F20 (83H) F20 key
+ VKEY_F20 = 0x83,
+
+ // VKEY_F21 (84H) F21 key
+ VKEY_F21 = 0x84,
+
+ // VKEY_F22 (85H) F22 key
+ VKEY_F22 = 0x85,
+
+ // VKEY_F23 (86H) F23 key
+ VKEY_F23 = 0x86,
+
+ // VKEY_F24 (87H) F24 key
+ VKEY_F24 = 0x87,
+
+ // VKEY_NUMLOCK (90) NUM LOCK key
+ VKEY_NUMLOCK = 0x90,
+
+ // VKEY_SCROLL (91) SCROLL LOCK key
+ VKEY_SCROLL = 0x91,
+
+ // VKEY_LSHIFT (A0) Left SHIFT key
+ VKEY_LSHIFT = 0xA0,
+
+ // VKEY_RSHIFT (A1) Right SHIFT key
+ VKEY_RSHIFT = 0xA1,
+
+ // VKEY_LCONTROL (A2) Left CONTROL key
+ VKEY_LCONTROL = 0xA2,
+
+ // VKEY_RCONTROL (A3) Right CONTROL key
+ VKEY_RCONTROL = 0xA3,
+
+ // VKEY_LMENU (A4) Left MENU key
+ VKEY_LMENU = 0xA4,
+
+ // VKEY_RMENU (A5) Right MENU key
+ VKEY_RMENU = 0xA5,
+
+ // VKEY_BROWSER_BACK (A6) Windows 2000/XP: Browser Back key
+ VKEY_BROWSER_BACK = 0xA6,
+
+ // VKEY_BROWSER_FORWARD (A7) Windows 2000/XP: Browser Forward key
+ VKEY_BROWSER_FORWARD = 0xA7,
+
+ // VKEY_BROWSER_REFRESH (A8) Windows 2000/XP: Browser Refresh key
+ VKEY_BROWSER_REFRESH = 0xA8,
+
+ // VKEY_BROWSER_STOP (A9) Windows 2000/XP: Browser Stop key
+ VKEY_BROWSER_STOP = 0xA9,
+
+ // VKEY_BROWSER_SEARCH (AA) Windows 2000/XP: Browser Search key
+ VKEY_BROWSER_SEARCH = 0xAA,
+
+ // VKEY_BROWSER_FAVORITES (AB) Windows 2000/XP: Browser Favorites key
+ VKEY_BROWSER_FAVORITES = 0xAB,
+
+ // VKEY_BROWSER_HOME (AC) Windows 2000/XP: Browser Start and Home key
+ VKEY_BROWSER_HOME = 0xAC,
+
+ // VKEY_VOLUME_MUTE (AD) Windows 2000/XP: Volume Mute key
+ VKEY_VOLUME_MUTE = 0xAD,
+
+ // VKEY_VOLUME_DOWN (AE) Windows 2000/XP: Volume Down key
+ VKEY_VOLUME_DOWN = 0xAE,
+
+ // VKEY_VOLUME_UP (AF) Windows 2000/XP: Volume Up key
+ VKEY_VOLUME_UP = 0xAF,
+
+ // VKEY_MEDIA_NEXT_TRACK (B0) Windows 2000/XP: Next Track key
+ VKEY_MEDIA_NEXT_TRACK = 0xB0,
+
+ // VKEY_MEDIA_PREV_TRACK (B1) Windows 2000/XP: Previous Track key
+ VKEY_MEDIA_PREV_TRACK = 0xB1,
+
+ // VKEY_MEDIA_STOP (B2) Windows 2000/XP: Stop Media key
+ VKEY_MEDIA_STOP = 0xB2,
+
+ // VKEY_MEDIA_PLAY_PAUSE (B3) Windows 2000/XP: Play/Pause Media key
+ VKEY_MEDIA_PLAY_PAUSE = 0xB3,
+
+ // VKEY_LAUNCH_MAIL (B4) Windows 2000/XP: Start Mail key
+ VKEY_MEDIA_LAUNCH_MAIL = 0xB4,
+
+ // VKEY_LAUNCH_MEDIA_SELECT (B5) Windows 2000/XP: Select Media key
+ VKEY_MEDIA_LAUNCH_MEDIA_SELECT = 0xB5,
+
+ // VKEY_LAUNCH_APP1 (B6) Windows 2000/XP: Start Application 1 key
+ VKEY_MEDIA_LAUNCH_APP1 = 0xB6,
+
+ // VKEY_LAUNCH_APP2 (B7) Windows 2000/XP: Start Application 2 key
+ VKEY_MEDIA_LAUNCH_APP2 = 0xB7,
+
+ // VKEY_OEM_1 (BA) Used for miscellaneous characters, it can vary by keyboard. Windows 2000/XP: For the US standard keyboard, the ',:' key
+ VKEY_OEM_1 = 0xBA,
+
+ // VKEY_OEM_PLUS (BB) Windows 2000/XP: For any country/region, the '+' key
+ VKEY_OEM_PLUS = 0xBB,
+
+ // VKEY_OEM_COMMA (BC) Windows 2000/XP: For any country/region, the ',' key
+ VKEY_OEM_COMMA = 0xBC,
+
+ // VKEY_OEM_MINUS (BD) Windows 2000/XP: For any country/region, the '-' key
+ VKEY_OEM_MINUS = 0xBD,
+
+ // VKEY_OEM_PERIOD (BE) Windows 2000/XP: For any country/region, the '.' key
+ VKEY_OEM_PERIOD = 0xBE,
+
+ // VKEY_OEM_2 (BF) Used for miscellaneous characters, it can vary by keyboard. Windows 2000/XP: For the US standard keyboard, the '/?' key
+ VKEY_OEM_2 = 0xBF,
+
+ // VKEY_OEM_3 (C0) Used for miscellaneous characters, it can vary by keyboard. Windows 2000/XP: For the US standard keyboard, the '`~' key
+ VKEY_OEM_3 = 0xC0,
+
+ // VKEY_OEM_4 (DB) Used for miscellaneous characters, it can vary by keyboard. Windows 2000/XP: For the US standard keyboard, the '[{' key
+ VKEY_OEM_4 = 0xDB,
+
+ // VKEY_OEM_5 (DC) Used for miscellaneous characters, it can vary by keyboard. Windows 2000/XP: For the US standard keyboard, the '\|' key
+ VKEY_OEM_5 = 0xDC,
+
+ // VKEY_OEM_6 (DD) Used for miscellaneous characters, it can vary by keyboard. Windows 2000/XP: For the US standard keyboard, the ']}' key
+ VKEY_OEM_6 = 0xDD,
+
+ // VKEY_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
+ VKEY_OEM_7 = 0xDE,
+
+ // VKEY_OEM_8 (DF) Used for miscellaneous characters, it can vary by keyboard.
+ VKEY_OEM_8 = 0xDF,
+
+ // VKEY_OEM_102 (E2) Windows 2000/XP: Either the angle bracket key or the backslash key on the RT 102-key keyboard
+ VKEY_OEM_102 = 0xE2,
+
+ // VKEY_PROCESSKEY (E5) Windows 95/98/Me, Windows NT 4.0, Windows 2000/XP: IME PROCESS key
+ VKEY_PROCESSKEY = 0xE5,
+
+ // VKEY_PACKET (E7) Windows 2000/XP: Used to pass Unicode characters as if they were keystrokes. The VKEY_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
+ VKEY_PACKET = 0xE7,
+
+ // VKEY_ATTN (F6) Attn key
+ VKEY_ATTN = 0xF6,
+
+ // VKEY_CRSEL (F7) CrSel key
+ VKEY_CRSEL = 0xF7,
+
+ // VKEY_EXSEL (F8) ExSel key
+ VKEY_EXSEL = 0xF8,
+
+ // VKEY_EREOF (F9) Erase EOF key
+ VKEY_EREOF = 0xF9,
+
+ // VKEY_PLAY (FA) Play key
+ VKEY_PLAY = 0xFA,
+
+ // VKEY_ZOOM (FB) Zoom key
+ VKEY_ZOOM = 0xFB,
+
+ // VKEY_NONAME (FC) Reserved for future use
+ VKEY_NONAME = 0xFC,
+
+ // VKEY_PA1 (FD) PA1 key
+ VKEY_PA1 = 0xFD,
+
+ // VKEY_OEM_CLEAR (FE) Clear key
+ VKEY_OEM_CLEAR = 0xFE,
+
+ VKEY_UNKNOWN = 0
+
+};
+
+}
+
+#endif
diff --git a/webkit/port/platform/chromium/KeyboardCodesWin.h b/webkit/port/platform/chromium/KeyboardCodesWin.h
new file mode 100644
index 0000000..e23fadc
--- /dev/null
+++ b/webkit/port/platform/chromium/KeyboardCodesWin.h
@@ -0,0 +1,552 @@
+// Copyright (c) 2008, Google 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:
+//
+// * Redistributions of source code must retain the above copyright
+// notice, this list of conditions and the following disclaimer.
+// * 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.
+// * Neither the name of Google Inc. nor the names of its
+// contributors may be used to endorse or promote products derived from
+// this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+// "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 THE COPYRIGHT
+// OWNER 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 KeyboardCodesWin_h
+#define KeyboardCodesWin_h
+
+#include <windows.h>
+
+namespace WebCore {
+
+enum {
+
+ // VKEY_LBUTTON (01) Left mouse button
+ // VKEY_RBUTTON (02) Right mouse button
+ // VKEY_CANCEL (03) Control-break processing
+ // VKEY_MBUTTON (04) Middle mouse button (three-button mouse)
+ // VKEY_XBUTTON1 (05)
+ // VKEY_XBUTTON2 (06)
+
+ // VKEY_BACK (08) BACKSPACE key
+ VKEY_BACK = VK_BACK,
+
+ // VKEY_TAB (09) TAB key
+ VKEY_TAB = VK_TAB,
+
+ // VKEY_CLEAR (0C) CLEAR key
+ VKEY_CLEAR = VK_CLEAR,
+
+ // VKEY_RETURN (0D)
+ VKEY_RETURN = VK_RETURN,
+
+ // VKEY_SHIFT (10) SHIFT key
+ VKEY_SHIFT = VK_SHIFT,
+
+ // VKEY_CONTROL (11) CTRL key
+ VKEY_CONTROL = VK_CONTROL,
+
+ // VKEY_MENU (12) ALT key
+ VKEY_MENU = VK_MENU,
+
+ // VKEY_PAUSE (13) PAUSE key
+ VKEY_PAUSE = VK_PAUSE,
+
+ // VKEY_CAPITAL (14) CAPS LOCK key
+ VKEY_CAPITAL = VK_CAPITAL,
+
+ // VKEY_KANA (15) Input Method Editor (IME) Kana mode
+ VKEY_KANA = VK_KANA,
+
+ // VKEY_HANGUEL (15) IME Hanguel mode (maintained for compatibility, use VKEY_HANGUL)
+ // VKEY_HANGUL (15) IME Hangul mode
+ VKEY_HANGUL = VK_HANGUL,
+
+ // VKEY_JUNJA (17) IME Junja mode
+ VKEY_JUNJA = VK_JUNJA,
+
+ // VKEY_FINAL (18) IME final mode
+ VKEY_FINAL = VK_FINAL,
+
+ // VKEY_HANJA (19) IME Hanja mode
+ VKEY_HANJA = VK_HANJA,
+
+ // VKEY_KANJI (19) IME Kanji mode
+ VKEY_KANJI = VK_KANJI,
+
+ // VKEY_ESCAPE (1B) ESC key
+ VKEY_ESCAPE = VK_ESCAPE,
+
+ // VKEY_CONVERT (1C) IME convert
+ VKEY_CONVERT = VK_CONVERT,
+
+ // VKEY_NONCONVERT (1D) IME nonconvert
+ VKEY_NONCONVERT = VK_NONCONVERT,
+
+ // VKEY_ACCEPT (1E) IME accept
+ VKEY_ACCEPT = VK_ACCEPT,
+
+ // VKEY_MODECHANGE (1F) IME mode change request
+ VKEY_MODECHANGE = VK_MODECHANGE,
+
+ // VKEY_SPACE (20) SPACEBAR
+ VKEY_SPACE = VK_SPACE,
+
+ // VKEY_PRIOR (21) PAGE UP key
+ VKEY_PRIOR = VK_PRIOR,
+
+ // VKEY_NEXT (22) PAGE DOWN key
+ VKEY_NEXT = VK_NEXT,
+
+ // VKEY_END (23) END key
+ VKEY_END = VK_END,
+
+ // VKEY_HOME (24) HOME key
+ VKEY_HOME = VK_HOME,
+
+ // VKEY_LEFT (25) LEFT ARROW key
+ VKEY_LEFT = VK_LEFT,
+
+ // VKEY_UP (26) UP ARROW key
+ VKEY_UP = VK_UP,
+
+ // VKEY_RIGHT (27) RIGHT ARROW key
+ VKEY_RIGHT = VK_RIGHT,
+
+ // VKEY_DOWN (28) DOWN ARROW key
+ VKEY_DOWN = VK_DOWN,
+
+ // VKEY_SELECT (29) SELECT key
+ VKEY_SELECT = VK_SELECT,
+
+ // VKEY_PRINT (2A) PRINT key
+ VKEY_PRINT = VK_PRINT,
+
+ // VKEY_EXECUTE (2B) EXECUTE key
+ VKEY_EXECUTE = VK_EXECUTE,
+
+ // VKEY_SNAPSHOT (2C) PRINT SCREEN key
+ VKEY_SNAPSHOT = VK_SNAPSHOT,
+
+ // VKEY_INSERT (2D) INS key
+ VKEY_INSERT = VK_INSERT,
+
+ // VKEY_DELETE (2E) DEL key
+ VKEY_DELETE = VK_DELETE,
+
+ // VKEY_HELP (2F) HELP key
+ VKEY_HELP = VK_HELP,
+
+ // (30) 0 key
+ VKEY_0 = '0',
+
+ // (31) 1 key
+ VKEY_1 = '1',
+
+ // (32) 2 key
+ VKEY_2 = '2',
+
+ // (33) 3 key
+ VKEY_3 = '3',
+
+ // (34) 4 key
+ VKEY_4 = '4',
+
+ // (35) 5 key,
+
+ VKEY_5 = '5',
+
+ // (36) 6 key
+ VKEY_6 = '6',
+
+ // (37) 7 key
+ VKEY_7 = '7',
+
+ // (38) 8 key
+ VKEY_8 = '8',
+
+ // (39) 9 key
+ VKEY_9 = '9',
+
+ // (41) A key
+ VKEY_A = 'A',
+
+ // (42) B key
+ VKEY_B = 'B',
+
+ // (43) C key
+ VKEY_C = 'C',
+
+ // (44) D key
+ VKEY_D = 'D',
+
+ // (45) E key
+ VKEY_E = 'E',
+
+ // (46) F key
+ VKEY_F = 'F',
+
+ // (47) G key
+ VKEY_G = 'G',
+
+ // (48) H key
+ VKEY_H = 'H',
+
+ // (49) I key
+ VKEY_I = 'I',
+
+ // (4A) J key
+ VKEY_J = 'J',
+
+ // (4B) K key
+ VKEY_K = 'K',
+
+ // (4C) L key
+ VKEY_L = 'L',
+
+ // (4D) M key
+ VKEY_M = 'M',
+
+ // (4E) N key
+ VKEY_N = 'N',
+
+ // (4F) O key
+ VKEY_O = 'O',
+
+ // (50) P key
+ VKEY_P = 'P',
+
+ // (51) Q key
+ VKEY_Q = 'Q',
+
+ // (52) R key
+ VKEY_R = 'R',
+
+ // (53) S key
+ VKEY_S = 'S',
+
+ // (54) T key
+ VKEY_T = 'T',
+
+ // (55) U key
+ VKEY_U = 'U',
+
+ // (56) V key
+ VKEY_V = 'V',
+
+ // (57) W key
+ VKEY_W = 'W',
+
+ // (58) X key
+ VKEY_X = 'X',
+
+ // (59) Y key
+ VKEY_Y = 'Y',
+
+ // (5A) Z key
+ VKEY_Z = 'Z',
+
+ // VKEY_LWIN (5B) Left Windows key (Microsoft Natural keyboard)
+ VKEY_LWIN = VK_LWIN,
+
+ // VKEY_RWIN (5C) Right Windows key (Natural keyboard)
+ VKEY_RWIN = VK_RWIN,
+
+ // VKEY_APPS (5D) Applications key (Natural keyboard)
+ VKEY_APPS = VK_APPS,
+
+ // VKEY_SLEEP (5F) Computer Sleep key
+ VKEY_SLEEP = VK_SLEEP,
+
+ // VKEY_NUMPAD0 (60) Numeric keypad 0 key
+ VKEY_NUMPAD0 = VK_NUMPAD0,
+
+ // VKEY_NUMPAD1 (61) Numeric keypad 1 key
+ VKEY_NUMPAD1 = VK_NUMPAD1,
+
+ // VKEY_NUMPAD2 (62) Numeric keypad 2 key
+ VKEY_NUMPAD2 = VK_NUMPAD2,
+
+ // VKEY_NUMPAD3 (63) Numeric keypad 3 key
+ VKEY_NUMPAD3 = VK_NUMPAD3,
+
+ // VKEY_NUMPAD4 (64) Numeric keypad 4 key
+ VKEY_NUMPAD4 = VK_NUMPAD4,
+
+ // VKEY_NUMPAD5 (65) Numeric keypad 5 key
+ VKEY_NUMPAD5 = VK_NUMPAD5,
+
+ // VKEY_NUMPAD6 (66) Numeric keypad 6 key
+ VKEY_NUMPAD6 = VK_NUMPAD6,
+
+ // VKEY_NUMPAD7 (67) Numeric keypad 7 key
+ VKEY_NUMPAD7 = VK_NUMPAD7,
+
+ // VKEY_NUMPAD8 (68) Numeric keypad 8 key
+ VKEY_NUMPAD8 = VK_NUMPAD8,
+
+ // VKEY_NUMPAD9 (69) Numeric keypad 9 key
+ VKEY_NUMPAD9 = VK_NUMPAD9,
+
+ // VKEY_MULTIPLY (6A) Multiply key
+ VKEY_MULTIPLY = VK_MULTIPLY,
+
+ // VKEY_ADD (6B) Add key
+ VKEY_ADD = VK_ADD,
+
+ // VKEY_SEPARATOR (6C) Separator key
+ VKEY_SEPARATOR = VK_SEPARATOR,
+
+ // VKEY_SUBTRACT (6D) Subtract key
+ VKEY_SUBTRACT = VK_SUBTRACT,
+
+ // VKEY_DECIMAL (6E) Decimal key
+ VKEY_DECIMAL = VK_DECIMAL,
+
+ // VKEY_DIVIDE (6F) Divide key
+ VKEY_DIVIDE = VK_DIVIDE,
+
+ // VKEY_F1 (70) F1 key
+ VKEY_F1 = VK_F1,
+
+ // VKEY_F2 (71) F2 key
+ VKEY_F2 = VK_F2,
+
+ // VKEY_F3 (72) F3 key
+ VKEY_F3 = VK_F3,
+
+ // VKEY_F4 (73) F4 key
+ VKEY_F4 = VK_F4,
+
+ // VKEY_F5 (74) F5 key
+ VKEY_F5 = VK_F5,
+
+ // VKEY_F6 (75) F6 key
+ VKEY_F6 = VK_F6,
+
+ // VKEY_F7 (76) F7 key
+ VKEY_F7 = VK_F7,
+
+ // VKEY_F8 (77) F8 key
+ VKEY_F8 = VK_F8,
+
+ // VKEY_F9 (78) F9 key
+ VKEY_F9 = VK_F9,
+
+ // VKEY_F10 (79) F10 key
+ VKEY_F10 = VK_F10,
+
+ // VKEY_F11 (7A) F11 key
+ VKEY_F11 = VK_F11,
+
+ // VKEY_F12 (7B) F12 key
+ VKEY_F12 = VK_F12,
+
+ // VKEY_F13 (7C) F13 key
+ VKEY_F13 = VK_F13,
+
+ // VKEY_F14 (7D) F14 key
+ VKEY_F14 = VK_F14,
+
+ // VKEY_F15 (7E) F15 key
+ VKEY_F15 = VK_F15,
+
+ // VKEY_F16 (7F) F16 key
+ VKEY_F16 = VK_F16,
+
+ // VKEY_F17 (80H) F17 key
+ VKEY_F17 = VK_F17,
+
+ // VKEY_F18 (81H) F18 key
+ VKEY_F18 = VK_F18,
+
+ // VKEY_F19 (82H) F19 key
+ VKEY_F19 = VK_F19,
+
+ // VKEY_F20 (83H) F20 key
+ VKEY_F20 = VK_F20,
+
+ // VKEY_F21 (84H) F21 key
+ VKEY_F21 = VK_F21,
+
+ // VKEY_F22 (85H) F22 key
+ VKEY_F22 = VK_F22,
+
+ // VKEY_F23 (86H) F23 key
+ VKEY_F23 = VK_F23,
+
+ // VKEY_F24 (87H) F24 key
+ VKEY_F24 = VK_F24,
+
+ // VKEY_NUMLOCK (90) NUM LOCK key
+ VKEY_NUMLOCK = VK_NUMLOCK,
+
+ // VKEY_SCROLL (91) SCROLL LOCK key
+ VKEY_SCROLL = VK_SCROLL,
+
+ // VKEY_LSHIFT (A0) Left SHIFT key
+ VKEY_LSHIFT = VK_LSHIFT,
+
+ // VKEY_RSHIFT (A1) Right SHIFT key
+ VKEY_RSHIFT = VK_RSHIFT,
+
+ // VKEY_LCONTROL (A2) Left CONTROL key
+ VKEY_LCONTROL = VK_LCONTROL,
+
+ // VKEY_RCONTROL (A3) Right CONTROL key
+ VKEY_RCONTROL = VK_RCONTROL,
+
+ // VKEY_LMENU (A4) Left MENU key
+ VKEY_LMENU = VK_LMENU,
+
+ // VKEY_RMENU (A5) Right MENU key
+ VKEY_RMENU = VK_RMENU,
+
+ // VKEY_BROWSER_BACK (A6) Windows 2000/XP: Browser Back key
+ VKEY_BROWSER_BACK = VK_BROWSER_BACK,
+
+ // VKEY_BROWSER_FORWARD (A7) Windows 2000/XP: Browser Forward key
+ VKEY_BROWSER_FORWARD = VK_BROWSER_FORWARD,
+
+ // VKEY_BROWSER_REFRESH (A8) Windows 2000/XP: Browser Refresh key
+ VKEY_BROWSER_REFRESH = VK_BROWSER_REFRESH,
+
+ // VKEY_BROWSER_STOP (A9) Windows 2000/XP: Browser Stop key
+ VKEY_BROWSER_STOP = VK_BROWSER_STOP,
+
+ // VKEY_BROWSER_SEARCH (AA) Windows 2000/XP: Browser Search key
+ VKEY_BROWSER_SEARCH = VK_BROWSER_SEARCH,
+
+ // VKEY_BROWSER_FAVORITES (AB) Windows 2000/XP: Browser Favorites key
+ VKEY_BROWSER_FAVORITES = VK_BROWSER_FAVORITES,
+
+ // VKEY_BROWSER_HOME (AC) Windows 2000/XP: Browser Start and Home key
+ VKEY_BROWSER_HOME = VK_BROWSER_HOME,
+
+ // VKEY_VOLUME_MUTE (AD) Windows 2000/XP: Volume Mute key
+ VKEY_VOLUME_MUTE = VK_VOLUME_MUTE,
+
+ // VKEY_VOLUME_DOWN (AE) Windows 2000/XP: Volume Down key
+ VKEY_VOLUME_DOWN = VK_VOLUME_DOWN,
+
+ // VKEY_VOLUME_UP (AF) Windows 2000/XP: Volume Up key
+ VKEY_VOLUME_UP = VK_VOLUME_UP,
+
+ // VKEY_MEDIA_NEXT_TRACK (B0) Windows 2000/XP: Next Track key
+ VKEY_MEDIA_NEXT_TRACK = VK_MEDIA_NEXT_TRACK,
+
+ // VKEY_MEDIA_PREV_TRACK (B1) Windows 2000/XP: Previous Track key
+ VKEY_MEDIA_PREV_TRACK = VK_MEDIA_PREV_TRACK,
+
+ // VKEY_MEDIA_STOP (B2) Windows 2000/XP: Stop Media key
+ VKEY_MEDIA_STOP = VK_MEDIA_STOP,
+
+ // VKEY_MEDIA_PLAY_PAUSE (B3) Windows 2000/XP: Play/Pause Media key
+ VKEY_MEDIA_PLAY_PAUSE = VK_MEDIA_PLAY_PAUSE,
+
+ // VKEY_LAUNCH_MAIL (B4) Windows 2000/XP: Start Mail key
+ VKEY_MEDIA_LAUNCH_MAIL = 0xB4,
+
+ // VKEY_LAUNCH_MEDIA_SELECT (B5) Windows 2000/XP: Select Media key
+ VKEY_MEDIA_LAUNCH_MEDIA_SELECT = 0xB5,
+
+ // VKEY_LAUNCH_APP1 (B6) Windows 2000/XP: Start Application 1 key
+ VKEY_MEDIA_LAUNCH_APP1 = 0xB6,
+
+ // VKEY_LAUNCH_APP2 (B7) Windows 2000/XP: Start Application 2 key
+ VKEY_MEDIA_LAUNCH_APP2 = 0xB7,
+
+ // VKEY_OEM_1 (BA) Used for miscellaneous characters, it can vary by keyboard. Windows 2000/XP: For the US standard keyboard, the ',:' key
+ VKEY_OEM_1 = VK_OEM_1,
+
+ // VKEY_OEM_PLUS (BB) Windows 2000/XP: For any country/region, the '+' key
+ VKEY_OEM_PLUS = VK_OEM_PLUS,
+
+ // VKEY_OEM_COMMA (BC) Windows 2000/XP: For any country/region, the ',' key
+ VKEY_OEM_COMMA = VK_OEM_COMMA,
+
+ // VKEY_OEM_MINUS (BD) Windows 2000/XP: For any country/region, the '-' key
+ VKEY_OEM_MINUS = VK_OEM_MINUS,
+
+ // VKEY_OEM_PERIOD (BE) Windows 2000/XP: For any country/region, the '.' key
+ VKEY_OEM_PERIOD = VK_OEM_PERIOD,
+
+ // VKEY_OEM_2 (BF) Used for miscellaneous characters, it can vary by keyboard. Windows 2000/XP: For the US standard keyboard, the '/?' key
+ VKEY_OEM_2 = VK_OEM_2,
+
+ // VKEY_OEM_3 (C0) Used for miscellaneous characters, it can vary by keyboard. Windows 2000/XP: For the US standard keyboard, the '`~' key
+ VKEY_OEM_3 = VK_OEM_3,
+
+ // VKEY_OEM_4 (DB) Used for miscellaneous characters, it can vary by keyboard. Windows 2000/XP: For the US standard keyboard, the '[{' key
+ VKEY_OEM_4 = VK_OEM_4,
+
+ // VKEY_OEM_5 (DC) Used for miscellaneous characters, it can vary by keyboard. Windows 2000/XP: For the US standard keyboard, the '\|' key
+ VKEY_OEM_5 = VK_OEM_5,
+
+ // VKEY_OEM_6 (DD) Used for miscellaneous characters, it can vary by keyboard. Windows 2000/XP: For the US standard keyboard, the ']}' key
+ VKEY_OEM_6 = VK_OEM_6,
+
+ // VKEY_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
+ VKEY_OEM_7 = VK_OEM_7,
+
+ // VKEY_OEM_8 (DF) Used for miscellaneous characters, it can vary by keyboard.
+ VKEY_OEM_8 = VK_OEM_8,
+
+ // VKEY_OEM_102 (E2) Windows 2000/XP: Either the angle bracket key or the backslash key on the RT 102-key keyboard
+ VKEY_OEM_102 = VK_OEM_102,
+
+ // VKEY_PROCESSKEY (E5) Windows 95/98/Me, Windows NT 4.0, Windows 2000/XP: IME PROCESS key
+ VKEY_PROCESSKEY = VK_PROCESSKEY,
+
+ // VKEY_PACKET (E7) Windows 2000/XP: Used to pass Unicode characters as if they were keystrokes. The VKEY_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
+ VKEY_PACKET = VK_PACKET,
+
+ // VKEY_ATTN (F6) Attn key
+ VKEY_ATTN = VK_ATTN,
+
+ // VKEY_CRSEL (F7) CrSel key
+ VKEY_CRSEL = VK_CRSEL,
+
+ // VKEY_EXSEL (F8) ExSel key
+ VKEY_EXSEL = VK_EXSEL,
+
+ // VKEY_EREOF (F9) Erase EOF key
+ VKEY_EREOF = VK_EREOF,
+
+ // VKEY_PLAY (FA) Play key
+ VKEY_PLAY = VK_PLAY,
+
+ // VKEY_ZOOM (FB) Zoom key
+ VKEY_ZOOM = VK_ZOOM,
+
+ // VKEY_NONAME (FC) Reserved for future use
+ VKEY_NONAME = VK_NONAME,
+
+ // VKEY_PA1 (FD) PA1 key
+ VKEY_PA1 = VK_PA1,
+
+ // VKEY_OEM_CLEAR (FE) Clear key
+ VKEY_OEM_CLEAR = VK_OEM_CLEAR,
+
+ VKEY_UNKNOWN = 0
+
+};
+
+}
+
+#endif
diff --git a/webkit/port/platform/chromium/PopupMenuChromium.cpp b/webkit/port/platform/chromium/PopupMenuChromium.cpp
index 841ca08..d30df68 100644
--- a/webkit/port/platform/chromium/PopupMenuChromium.cpp
+++ b/webkit/port/platform/chromium/PopupMenuChromium.cpp
@@ -43,6 +43,7 @@
#include "FramelessScrollViewClient.h"
#include "GraphicsContext.h"
#include "IntRect.h"
+#include "KeyboardCodes.h"
#include "NotImplemented.h"
#include "Page.h"
#include "PlatformKeyboardEvent.h"
@@ -54,11 +55,6 @@
#include "ScrollbarTheme.h"
#include "SystemTime.h"
#include "Widget.h"
-
-#if !PLATFORM(WIN_OS)
-#include "KeyboardCodes.h"
-#endif
-
#pragma warning(pop)
using namespace WTF;
@@ -557,32 +553,32 @@ bool PopupListBox::handleKeyEvent(const PlatformKeyboardEvent& event)
if (event.type() == PlatformKeyboardEvent::KeyUp)
return true;
- if (numItems() == 0 && event.windowsVirtualKeyCode() != VK_ESCAPE)
+ if (numItems() == 0 && event.windowsVirtualKeyCode() != VKEY_ESCAPE)
return true;
switch (event.windowsVirtualKeyCode()) {
- case VK_ESCAPE:
+ case VKEY_ESCAPE:
abandon(); // may delete this
return true;
- case VK_RETURN:
+ case VKEY_RETURN:
acceptIndex(m_selectedIndex); // may delete this
return true;
- case VK_UP:
+ case VKEY_UP:
adjustSelectedIndex(-1);
break;
- case VK_DOWN:
+ case VKEY_DOWN:
adjustSelectedIndex(1);
break;
- case VK_PRIOR:
+ case VKEY_PRIOR:
adjustSelectedIndex(-m_visibleRows);
break;
- case VK_NEXT:
+ case VKEY_NEXT:
adjustSelectedIndex(m_visibleRows);
break;
- case VK_HOME:
+ case VKEY_HOME:
adjustSelectedIndex(-m_selectedIndex);
break;
- case VK_END:
+ case VKEY_END:
adjustSelectedIndex(m_items.size());
break;
default:
diff --git a/webkit/tools/test_shell/SConscript b/webkit/tools/test_shell/SConscript
index d8a1c9e..8ff5fcd 100644
--- a/webkit/tools/test_shell/SConscript
+++ b/webkit/tools/test_shell/SConscript
@@ -153,6 +153,7 @@ if env['PLATFORM'] == 'win32':
test_files = [
'image_decoder_unittest.cc',
+ 'keyboard_unittest.cc',
'run_all_tests.cc',
'layout_test_controller_unittest.cc',
'$WEBKIT_DIR/glue/autocomplete_input_listener_unittest.cc',
@@ -168,10 +169,8 @@ test_files = [
if env['PLATFORM'] == 'win32':
# TODO(port): put portable files in above test_files declaration.
test_files.extend([
- 'keyboard_unittest.cc',
'node_leak_test.cc',
'plugin_tests.cc',
- 'run_all_tests.cc',
'test_shell_test.cc',
'text_input_controller_unittest.cc',
'$WEBKIT_DIR/glue/bookmarklet_unittest.cc',
diff --git a/webkit/tools/test_shell/keyboard_unittest.cc b/webkit/tools/test_shell/keyboard_unittest.cc
index dd540f8..8ed5e3c 100644
--- a/webkit/tools/test_shell/keyboard_unittest.cc
+++ b/webkit/tools/test_shell/keyboard_unittest.cc
@@ -4,11 +4,14 @@
#include "config.h"
-#pragma warning(push, 0)
+#include "base/compiler_specific.h"
+
+MSVC_PUSH_WARNING_LEVEL(0);
#include "EventNames.h"
#include "EventTarget.h"
+#include "KeyboardCodes.h"
#include "KeyboardEvent.h"
-#pragma warning(pop)
+MSVC_POP_WARNING();
#include "webkit/glue/editor_client_impl.h"
#include "webkit/glue/event_conversion.h"
@@ -76,7 +79,7 @@ TEST(KeyboardUnitTestKeyDown, TestCtrlV) {
TEST(KeyboardUnitTestKeyDown, TestEscape) {
WebKeyboardEvent keyboard_event;
- SetupKeyDownEvent(keyboard_event, VK_ESCAPE, no_modifiers);
+ SetupKeyDownEvent(keyboard_event, WebCore::VKEY_ESCAPE, no_modifiers);
const char* result = InterpretKeyEvent(keyboard_event,
PlatformKeyboardEvent::RawKeyDown);