// doc.cpp : implementation of the CMUSHclientDoc class
//

#include "stdafx.h"
#include "MUSHclient.h"
#include "doc.h"

#ifdef _DEBUG
//#define new DEBUG_NEW
#undef THIS_FILE
static char BASED_CODE THIS_FILE[] = __FILE__;
#endif

tCommandIDMapping CommandIDs [] = {
{ ID_APP_ABOUT,                         "About"                     },
{ ID_ALT_A,                             "AltA"                      },
{ ID_ALT_B,                             "AltB"                      },
{ ID_ALT_J,                             "AltJ"                      },
{ ID_ALT_K,                             "AltK"                      },
{ ID_ALT_L,                             "AltL"                      },
{ ID_ALT_M,                             "AltM"                      },
{ ID_ALT_N,                             "AltN"                      },
{ ID_ALT_O,                             "AltO"                      },
{ ID_ALT_P,                             "AltP"                      },
{ ID_ALT_Q,                             "AltQ"                      },
{ ID_ALT_R,                             "AltR"                      },
{ ID_ALT_S,                             "AltS"                      },
{ ID_ALT_T,                             "AltT"                      },
{ ID_ALT_U,                             "AltU"                      },
{ ID_ALT_V,                             "AltV"                      },
{ ID_ALT_X,                             "AltX"                      },
{ ID_ALT_Y,                             "AltY"                      },
{ ID_ALT_Z,                             "AltZ"                      },
{ ID_KEYS_ACTIVATECOMMANDVIEW,          "ActivateInputArea"         },
{ ID_DISPLAY_ACTIVITYLIST,              "ActivityList"              },
{ ID_VIEW_ACTIVITYTOOLBAR,              "ActivityToolbar"           },
{ ID_ALT_DOWNARROW,                     "AltDownArrow"              },
{ ID_ALT_UPARROW,                       "AltUpArrow"                },
{ ID_VIEW_ALWAYSONTOP,                  "AlwaysOnTop"               },
{ ID_EDIT_ASCIIART,                     "ASCIIart"                  },
{ ID_WINDOW_ARRANGE,                    "ArrangeIcons"              },
{ ID_CONNECTION_AUTOCONNECT,            "AutoConnect"               },
{ ID_GAME_AUTOSAY,                      "AutoSay"                   },
{ ID_CONVERT_BASE64ENCODE,              "Base64Encode"              },
{ ID_CONVERT_BASE64DECODE,              "Base64Decode"              },
{ ID_DISPLAY_BOOKMARKSELECTION,         "BookmarkSelection"         },
{ ID_HELP_BUGREPORTSUGGESTION,          "BugReports"                },
{ ID_WINDOW_CASCADE,                    "CascadeWindows"            },
{ ID_GAME_CHATSESSIONS,                 "ChatSessions"              },
{ ID_DISPLAY_CLEAR_COMMAND_HISTORY,     "ClearCommandHistory"       },
{ ID_DISPLAY_CLEAR_OUTPUT,              "ClearOutput"               },
{ ID_FILE_CLOSE,                        "Close"                     },
{ ID_WINDOW_CLOSEALLNOTEPADWINDOWS,     "CloseAllNotepadWindows"    },
{ ID_EDIT_COLOURPICKER,                 "ColourPicker"              },
{ ID_COMMAND_END,                       "CommandEnd"                },
{ ID_GAME_COMMANDHISTORY,               "CommandHistory"            },
{ ID_COMMAND_HOME,                      "CommandHome"               },
{ ID_GAME_CONFIGURE_ALIASES,            "ConfigureAliases"          },
{ ID_GAME_CONFIGURE_AUTOSAY,            "ConfigureAutosay"          },
{ ID_GAME_CONFIGURE_CHAT,               "ConfigureChat"             },
{ ID_GAME_CONFIGURE_COLOURS,            "ConfigureColours"          },
{ ID_GAME_CONFIGURE_COMMANDS,           "ConfigureCommands"         },
{ ID_GAME_CONFIGURE_CUSTOM_COLOURS,     "ConfigureCustomColours"    },
//{ ID_GAME_CONFIGURE_HIGHLIGHTING,       "ConfigureHighlighting"     },
{ ID_GAME_CONFIGURE_KEYPAD,             "ConfigureKeypad"           },
{ ID_GAME_CONFIGURE_LOGGING,            "ConfigureLogging"          },
{ ID_GAME_CONFIGURE_MACROS,             "ConfigureMacros"           },
{ ID_GAME_CONFIGURE_MUDADDRESS,         "ConfigureMudaddress"       },
{ ID_GAME_CONFIGURE_MXPPUEBLO,          "ConfigureMxpPueblo"        },
{ ID_GAME_CONFIGURE_NAME_AND_PASSWORD,  "ConfigureNameAndPassword"  },
{ ID_GAME_CONFIGURE_NOTES,              "ConfigureNotes"            },
{ ID_GAME_CONFIGURE_OUTPUT,             "ConfigureOutput"           },
{ ID_GAME_CONFIGURE_PASTETOWORLD,       "ConfigurePasteToWorld"     },
{ ID_GAME_CONFIGURE_PRINTING,           "ConfigurePrinting"         },
{ ID_GAME_CONFIGURE_SCRIPTING,          "ConfigureScripting"        },
{ ID_GAME_CONFIGURE_SENDFILE,           "ConfigureSendFile"         },
{ ID_GAME_CONFIGURE_TIMERS,             "ConfigureTimers"           },
{ ID_GAME_CONFIGURE_TRIGGERS,           "ConfigureTriggers"         },
{ ID_GAME_CONFIGURE_VARIABLES,          "ConfigureVariables"        },
{ ID_CONNECTION_CONNECT,                "Connect"                   },
{ ID_CONNECT_DISCONNECT,                "Connect_Or_Reconnect"      },
{ ID_CONNECTION_CONNECTTOALLOPENWORLDS, "ConnectToAllOpenWorlds"    },
{ ID_CONNECTION_CONNECTTOWORLDSINSTARTUPLIST, "ConnectToWorldsInStartupList" },
{ ID_CONTEXT_HELP,                      "ContextHelp"               },
{ ID_CONVERT_CONVERTHTMLSPECIAL,        "ConvertHTMLspecial"        },
{ ID_EDIT_CONVERTCLIPBOARDFORUMCODES,   "ConvertForumCodes"         },
{ ID_EDIT_COPY,                         "Copy"                      },
{ ID_EDIT_COPYASHTML,                   "CopyAsHTML"                },
{ ID_FILE_CTRL_N,                       "CtrlN"                     },
{ ID_FILE_CTRL_P,                       "CtrlP"                     },
{ ID_EDIT_CTRL_Z,                       "CtrlZ"                     },
{ ID_EDIT_CUT,                          "Cut"                       },
{ ID_EDIT_DEBUGINCOMINGPACKETS,         "DebugIncomingPackets"      },
{ ID_DEBUG_WORLD_INPUT,                 "DebugWorldInput"           },
{ ID_INPUT_DISCARDQUEUEDCOMMANDS,       "DiscardQueuedCommands"     },
{ ID_CONNECTION_DISCONNECT,             "Disconnect"                },
{ ID_GAME_DOMAPPERCOMMENT,              "DoMapperComment"           },
{ ID_GAME_DOMAPPERSPECIAL,              "DoMapperSpecial"           },
{ ID_CONVERT_DOSTOUNIX,                 "DosToUnix"                 },
{ ID_GAME_EAST,                         "East"                      },
{ ID_GAME_EDITSCRIPTFILE,               "EditScriptFile"            },
{ ID_TEST_END,                          "End"                       },
{ ID_GAME_EXAMINE,                      "Examine"                   },
{ ID_APP_EXIT,                          "ExitClient"                },
{ ID_DISPLAY_FIND,                      "Find"                      },
{ ID_DISPLAY_FINDAGAIN,                 "FindAgain"                 },
{ ID_EDIT_FLIPTONOTEPAD,                "FlipToNotepad"             },
{ ID_HELP_FORUM,                        "Forum"                     },
{ ID_DISPLAY_FREEZEOUTPUT,              "FreezeOutput"              },
{ ID_VIEW_FULLSCREENMODE,               "FullScreenMode"            },
{ ID_GAME_FUNCTIONSLIST,                "FunctionList"              },
{ ID_HELP_FUNCTIONSWEBPAGE,             "FunctionsWebPage"          },
{ ID_HELP_GETTINGSTARTED,               "GettingStarted"            },
{ ID_EDIT_GENERATECHARACTERNAME,        "GenerateCharacterName"     },
{ ID_EDIT_GENERATEUNIQUEID,             "GenerateUniqueID"          },
{ ID_FILE_PREFERENCES,                  "GlobalPreferences"         },
{ ID_DISPLAY_GOTOBOOKMARK,              "GoToBookmark"              },
{ ID_DISPLAY_GOTOLINE,                  "GoToLine"                  },
{ ID_EDIT_GOTOMATCHINGBRACE,            "GoToMatchingBrace"         },
{ ID_DISPLAY_GOTOURL,                   "GoToURL"                   },
{ ID_HELP,                              "Help"                      },
{ ID_HELP_INDEX,                        "HelpIndex"                 },
{ ID_HELP_CONTENTS,                     "HelpContents"              },
{ ID_DISPLAY_HIGHLIGHTPHRASE,           "HighlightWord"             },
{ ID_DISPLAY_MULTILINETRIGGER,          "MakeMultiLineTrigger"      },
{ ID_GAME_IMMEDIATE,                    "Immediate"                 },
{ ID_FILE_IMPORT,                       "Import"                    },
{ ID_GAME_CONFIGURE_INFO,               "Info"                      },
{ ID_VIEW_INFOBAR,                      "InfoBar"                   },
{ ID_INPUT_GLOBALCHANGE,                "InputGlobalChange"         },
{ ID_EDIT_INSERTDATETIME,               "InsertDateTime"            },
{ ID_INPUT_KEYNAME,                     "KeyName"                   },
{ ID_KEYPAD_0,                          "Keypad0"                   },
{ ID_KEYPAD_1,                          "Keypad1"                   },
{ ID_KEYPAD_2,                          "Keypad2"                   },
{ ID_KEYPAD_3,                          "Keypad3"                   },
{ ID_KEYPAD_4,                          "Keypad4"                   },
{ ID_KEYPAD_5,                          "Keypad5"                   },
{ ID_KEYPAD_6,                          "Keypad6"                   },
{ ID_KEYPAD_7,                          "Keypad7"                   },
{ ID_KEYPAD_8,                          "Keypad8"                   },
{ ID_KEYPAD_9,                          "Keypad9"                   },
{ ID_KEYPAD_DASH,                       "KeypadDash"                },
{ ID_KEYPAD_DOT,                        "KeypadDot"                 },
{ ID_KEYPAD_PLUS,                       "KeypadPlus"                },
{ ID_KEYPAD_SLASH,                      "KeypadSlash"               },
{ ID_KEYPAD_STAR,                       "KeypadStar"                },
{ ID_COMPLETE_FUNCTION,                 "CompleteFunction"          },
{ ID_CTRL_KEYPAD_0,                     "CtrlKeypad0"               },
{ ID_CTRL_KEYPAD_1,                     "CtrlKeypad1"               },
{ ID_CTRL_KEYPAD_2,                     "CtrlKeypad2"               },
{ ID_CTRL_KEYPAD_3,                     "CtrlKeypad3"               },
{ ID_CTRL_KEYPAD_4,                     "CtrlKeypad4"               },
{ ID_CTRL_KEYPAD_5,                     "CtrlKeypad5"               },
{ ID_CTRL_KEYPAD_6,                     "CtrlKeypad6"               },
{ ID_CTRL_KEYPAD_7,                     "CtrlKeypad7"               },
{ ID_CTRL_KEYPAD_8,                     "CtrlKeypad8"               },
{ ID_CTRL_KEYPAD_9,                     "CtrlKeypad9"               },
{ ID_CTRL_KEYPAD_DASH,                  "CtrlKeypadDash"            },
{ ID_CTRL_KEYPAD_DOT,                   "CtrlKeypadDot"             },
{ ID_CTRL_KEYPAD_PLUS,                  "CtrlKeypadPlus"            },
{ ID_CTRL_KEYPAD_SLASH,                 "CtrlKeypadSlash"           },
{ ID_CTRL_KEYPAD_STAR,                  "CtrlKeypadStar"            },
{ ID_KEYS_ESCAPE,                       "KeysEscape"                },
{ ID_KEYS_TAB,                          "KeysTab"                   },
{ ID_TEST_LINEDOWN,                     "LineDown"                  },
{ ID_TEST_LINEUP,                       "LineUp"                    },
{ ID_FILE_LOGSESSION,                   "LogSession"                },
{ ID_GAME_LOOK,                         "Look"                      },
{ ID_MACRO_CTRL_F1,                     "MacroCtrlF1"               },
{ ID_MACRO_CTRL_F10,                    "MacroCtrlF10"              },
{ ID_MACRO_CTRL_F11,                    "MacroCtrlF11"              },
{ ID_MACRO_CTRL_F12,                    "MacroCtrlF12"              },
{ ID_MACRO_CTRL_F2,                     "MacroCtrlF2"               },
{ ID_MACRO_CTRL_F3,                     "MacroCtrlF3"               },
{ ID_MACRO_CTRL_F5,                     "MacroCtrlF5"               },
{ ID_MACRO_CTRL_F6,                     "MacroCtrlF6"               },
{ ID_MACRO_CTRL_F7,                     "MacroCtrlF7"               },
{ ID_MACRO_CTRL_F8,                     "MacroCtrlF8"               },
{ ID_MACRO_CTRL_F9,                     "MacroCtrlF9"               },
{ ID_MACRO_F1,                          "MacroF1"                   },
{ ID_MACRO_F10,                         "MacroF10"                  },
{ ID_MACRO_F11,                         "MacroF11"                  },
{ ID_MACRO_F12,                         "MacroF12"                  },
{ ID_MACRO_F2,                          "MacroF2"                   },
{ ID_MACRO_F3,                          "MacroF3"                   },
{ ID_MACRO_F4,                          "MacroF4"                   },
{ ID_MACRO_F5,                          "MacroF5"                   },
{ ID_MACRO_F6,                          "MacroF6"                   },
{ ID_MACRO_F7,                          "MacroF7"                   },
{ ID_MACRO_F8,                          "MacroF8"                   },
{ ID_MACRO_F9,                          "MacroF9"                   },
{ ID_MACRO_SHIFT_F1,                    "MacroShiftF1"              },
{ ID_MACRO_SHIFT_F10,                   "MacroShiftF10"             },
{ ID_MACRO_SHIFT_F11,                   "MacroShiftF11"             },
{ ID_MACRO_SHIFT_F12,                   "MacroShiftF12"             },
{ ID_MACRO_SHIFT_F2,                    "MacroShiftF2"              },
{ ID_MACRO_SHIFT_F3,                    "MacroShiftF3"              },
{ ID_MACRO_SHIFT_F4,                    "MacroShiftF4"              },
{ ID_MACRO_SHIFT_F5,                    "MacroShiftF5"              },
{ ID_MACRO_SHIFT_F6,                    "MacroShiftF6"              },
{ ID_MACRO_SHIFT_F7,                    "MacroShiftF7"              },
{ ID_MACRO_SHIFT_F8,                    "MacroShiftF8"              },
{ ID_MACRO_SHIFT_F9,                    "MacroShiftF9"              },
{ ID_GAME_MAPPER,                       "Mapper"                    },
{ ID_GAME_MINIMISEPROGRAM,              "MinimiseProgram"           },
{ ID_WINDOW_MINIMIZE,                   "Minimize"                  },
{ ID_WINDOW_MAXIMIZE,                   "Maximize"                  },
{ ID_WINDOW_RESTORE,                    "Restore"                   },
{ ID_HELP_MUDLISTS,                     "MudLists"                  },
{ ID_KEYS_NEXTCOMMAND,                  "NextCommand"               },
{ ID_NEXT_PANE,                         "NextPane"                  },
{ ID_FILE_NEW,                          "New"                       },
{ ID_WINDOW_NEW,                        "NewWindow"                 },
{ ID_DISPLAY_NOCOMMANDECHO,             "NoCommandEcho"             },
{ ID_GAME_NORTH,                        "North"                     },
{ ID_EDIT_NOTESWORKAREA,                "NotesWorkArea"             },
{ ID_FILE_OPENWORLDSINSTARTUPLIST,      "OpenWorldsInStartupList"   },
{ ID_FILE_OPEN,                         "Open"                      },
{ ID_TEST_PAGEDOWN,                     "PageDown"                  },
{ ID_TEST_PAGEUP,                       "Pageup"                    },
{ ID_EDIT_PASTE,                        "Paste"                     },
{ ID_GAME_PASTEFILE,                    "PasteFile"                 },
{ ID_EDIT_PASTETOMUSH,                  "PasteToMush"               },
{ ID_FILE_PLUGINWIZARD,                 "PluginWizard"              },
{ ID_FILE_PLUGINS,                      "Plugins"                   },
{ ID_GAME_PREFERENCES,                  "Preferences"               },
{ ID_KEYS_PREVCOMMAND,                  "PreviousCommand"           },
{ ID_FILE_PRINT_WORLD,                  "Print"                     },
{ ID_FILE_PRINT_SETUP,                  "PrintSetup"                },
{ ID_CONNECTION_QUICK_CONNECT,          "QuickConnect"              },
{ ID_ACTIONS_QUIT,                      "Quit"                      },
{ ID_CONVERT_QUOTEFORUMCODES,           "QuoteForumCodes"           },
{ ID_CONVERT_QUOTELINES,                "QuoteLines"                },
{ ID_DISPLAY_RECALLTEXT,                "RecallText"                },
{ ID_CONNECTION_RECONNECTONDISCONNECT,  "ReconnectOnDisconnect"     },
{ ID_FILE_RELOADDEFAULTS,               "ReloadDefaults"            },
{ ID_EDIT_RELOADNAMESFILE,              "ReloadNamesFile"           },
{ ID_GAME_RELOAD_SCRIPT_FILE,           "ReloadScriptFile"          },
{ ID_REPEAT_LAST_COMMAND,               "RepeatLastCommand"         },
{ ID_REPEAT_LAST_WORD,                  "RepeatLastWord"            },
{ ID_GAME_RESETALLTIMERS,               "ResetAllTimers"            },
{ ID_VIEW_RESET_TOOLBARS,               "ResetToolbars"             },
{ ID_FILE_SAVE,                         "Save"                      },
{ ID_FILE_SAVE_AS,                      "SaveAs"                    },
{ ID_FILE_SAVESELECTION,                "SaveSelection"             },
{ ID_EDIT_SELECT_ALL,                   "SelectAll"                 },
{ ID_EDIT_SELECTTOMATCHINGBRACE,        "SelectMatchingBrace"       },
{ ID_DISPLAY_SENDMAILTO,                "SendMailTo"                },
{ ID_GAME_SENDTOALLWORLDS,              "SendToAllWorlds"           },
{ ID_EDIT_SENDTOCOMMANDWINDOW,          "SendToCommandWindow"       },
{ ID_EDIT_SENDTOIMMEDIATE,              "SendToScript"     },
{ ID_EDIT_SENDTOWORLD,                  "SendToWorld"               },
{ ID_GAME_SOUTH,                        "South"                     },
{ ID_EDIT_SPELLCHECK,                   "SpellCheck"                },
{ ID_TEST_START,                        "Start"                     },
{ ID_DISPLAY_STOPSOUNDPLAYING,          "StopSoundPlaying"          },
{ ID_GAME_TAKE,                         "Take"                      },
//{ ID_GAME_TESTCOMMAND,                  "TestCommand"               },
//{ ID_GAME_TESTTRIGGER,                  "TestTrigger"             },
{ ID_DISPLAY_TEXTATTRIBUTES,            "TextAttributes"            },
{ ID_WINDOW_TILE_HORZ,                  "TileWindows"               },
{ ID_WINDOW_TILE_VERT,                  "TileWindowsVertically"     },
{ ID_HELP_TIPOFTHEDAY,                  "TipOfTheDay"               },
{ ID_GAME_TRACE,                        "Trace"                     },
{ ID_EDIT_UNDO,                         "Undo"                      },
{ ID_UNCONVERT_CONVERTHTMLSPECIAL,      "UnconvertHTMLspecial"      },
{ ID_CONVERT_UNIXTODOS,                 "UnixToDos"                 },
{ ID_GAME_UP,                           "Up"                        },
{ ID_HELP_USING,                        "UsingHelp"                 },
{ ID_VIEW_TOOLBAR,                      "ViewToolbar"               },
{ ID_VIEW_GAME_TOOLBAR,                 "ViewWorldToolbar"          },
{ ID_VIEW_STATUS_BAR,                   "ViewStatusbar"             },
{ ID_WEB_PAGE,                          "WebPage"                   },
{ ID_GAME_WEST,                         "West"                      },
{ ID_GAME_WHISPER,                      "Whisper"                   },
{ ID_FILE_WINSOCK,                      "WindowsSocketInformation"  },
{ ID_EDIT_WORDCOUNT,                    "WordCount"                 },
{ ID_BTN_WORLDS_WORLD1,                 "World1"                    },
{ ID_BTN_WORLDS_WORLD2,                 "World2"                    },
{ ID_BTN_WORLDS_WORLD3,                 "World3"                    },
{ ID_BTN_WORLDS_WORLD4,                 "World4"                    },
{ ID_BTN_WORLDS_WORLD5,                 "World5"                    },
{ ID_BTN_WORLDS_WORLD6,                 "World6"                    },
{ ID_BTN_WORLDS_WORLD7,                 "World7"                    },
{ ID_BTN_WORLDS_WORLD8,                 "World8"                    },
{ ID_BTN_WORLDS_WORLD9,                 "World9"                    },
{ ID_BTN_WORLDS_WORLD0,                 "World10"                   },
                                                                  
{ ID_CONVERT_REMOVEENDOFLINES,          "WrapLines"                 },
{ ID_GAME_WRAPLINES,                    "WrapOutput"                },

// notepad

{ ID_FILE_PRINT,                        "PrintNotepad"              },
{ ID_FILE_PRINT_PREVIEW,                "PrintPreview"              },
{ ID_EDIT_GOTO,                         "GoToNotepadLine"           },
{ ID_EDIT_REFRESHRECALLEDDATA,          "RefreshRecalledData"       },
{ ID_SEARCH_FIND,                       "FindNotepad"               },
{ ID_SEARCH_FINDNEXT,                   "FindNextNotepad"           },
{ ID_SEARCH_GLOBALREPLACE,              "GlobalReplace"             },
{ ID_SEARCH_REPLACE,                    "ReplaceNotepad"            },
{ ID_CONVERT_MACTODOS,                  "MacToDos"                  },
{ ID_CONVERT_DOSTOMAC,                  "DosToMac"                  },
{ ID_CONVERT_UPPERCASE,                 "UpperCase"                 },
{ ID_CONVERT_LOWERCASE,                 "LowerCase"                 },
{ ID_CONVERT_REMOVEEXTRABLANKS,         "RemoveBlanks"              },  


// activity view

{ ID_POPUP_FILE_CLOSE,                  "ActivityViewCloseWorld"     },
{ ID_POPUP_FILE_SAVE,                   "ActivityViewSaveWorld"      },
{ ID_POPUP_SAVEWORLDDETAILSAS,          "ActivityViewSaveWorldAs"    },


{ 0, 0 },    // end of table marker

};  // end of CommandIDs table

#define  VK_OEM_1      0xBA
#define  VK_OEM_PLUS   0xBB
#define  VK_OEM_COMMA  0xBC
#define  VK_OEM_MINUS  0xBD
#define  VK_OEM_PERIOD 0xBE
#define  VK_OEM_2      0xBF
#define  VK_OEM_3      0xC0
#define  VK_OEM_4      0xDB
#define  VK_OEM_5      0xDC
#define  VK_OEM_6      0xDD
#define  VK_OEM_7      0xDE

tVirtualKeyMapping VirtualKeys [] = {

{ '0'  ,					"0" },
{ '1'  ,					"1" },
{ '2'  ,					"2" },
{ '3'  ,					"3" },
{ '4'  ,					"4" },
{ '5'  ,					"5" },
{ '6'  ,					"6" },
{ '7'  ,					"7" },
{ '8'  ,					"8" },
{ '9'  ,					"9" },
{ 'A'  ,					"A" },
{ VK_ACCEPT     , "Accept" },
{ VK_ADD        , "Add" },
{ VK_APPS       , "Apps" },
{ VK_ATTN       , "Attn" },
{ 'B'  ,					"B" },
{ VK_BACK       , "Backspace" },
{ 'C'  ,					"C" },
{ VK_CANCEL     , "Cancel" },
{ VK_CAPITAL    , "Capital" },
{ VK_CLEAR      , "Clear" },
{ VK_CONTROL    , "Control" },
{ VK_CONVERT    , "Convert" },
{ VK_CRSEL      , "Crsel" },
{ 'D'  ,					"D" },
{ VK_DECIMAL    , "Decimal" },
{ VK_DELETE     , "Delete" },
{ VK_DIVIDE     , "Divide" },
{ VK_DOWN       , "Down" },
{ 'E'  ,					"E" },
{ VK_END        , "End" },
{ VK_EREOF      , "Ereof" },
{ VK_ESCAPE     , "Esc" },
{ VK_EXECUTE    , "Execute" },
{ VK_EXSEL      , "Exsel" },
{ 'F'  ,					"F" },
{ VK_F1         , "F1" },
{ VK_F10        , "F10" },
{ VK_F11        , "F11" },
{ VK_F12        , "F12" },
{ VK_F13        , "F13" },
{ VK_F14        , "F14" },
{ VK_F15        , "F15" },
{ VK_F16        , "F16" },
{ VK_F17        , "F17" },
{ VK_F18        , "F18" },
{ VK_F19        , "F19" },
{ VK_F2         , "F2" },
{ VK_F20        , "F20" },
{ VK_F21        , "F21" },
{ VK_F22        , "F22" },
{ VK_F23        , "F23" },
{ VK_F24        , "F24" },
{ VK_F3         , "F3" },
{ VK_F4         , "F4" },
{ VK_F5         , "F5" },
{ VK_F6         , "F6" },
{ VK_F7         , "F7" },
{ VK_F8         , "F8" },
{ VK_F9         , "F9" },
{ VK_FINAL      , "Final" },
{ 'G'  ,					"G" },
{ 'H'  ,					"H" },
{ VK_HANGEUL    , "Hangeul" },
{ VK_HANGUL     , "Hangul" },
{ VK_HANJA      , "Hanja" },
{ VK_HELP       , "Help" },
{ VK_HOME       , "Home" },
{ 'I'  ,					"I" },
{ VK_INSERT     , "Insert" },
{ 'J'  ,					"J" },
{ VK_JUNJA      , "Junja" },
{ 'K'  ,					"K" },
{ VK_KANA       , "Kana" },
{ VK_KANJI      , "Kanji" },
{ 'L'  ,					"L" },
{ VK_LBUTTON    , "LButton" },
{ VK_LCONTROL   , "LControl" },
{ VK_LEFT       , "Left" },
{ VK_LMENU      , "LMenu" },
{ VK_LSHIFT     , "LShift" },
{ VK_LWIN       , "LWin" },
{ 'M'  ,					"M" },
{ VK_MBUTTON    , "MButton" },
{ VK_MENU       , "Menu" },
{ VK_MODECHANGE , "ModeChange" },
{ VK_MULTIPLY   , "Multiply" },
{ 'N'  ,					"N" },
{ VK_NEXT       , "PageDown" },
{ VK_NONAME     , "Noname" },
{ VK_NONCONVERT , "NonConvert" },
{ VK_NUMLOCK    , "Numlock" },
{ VK_NUMPAD0    , "Numpad0" },
{ VK_NUMPAD1    , "Numpad1" },
{ VK_NUMPAD2    , "Numpad2" },
{ VK_NUMPAD3    , "Numpad3" },
{ VK_NUMPAD4    , "Numpad4" },
{ VK_NUMPAD5    , "Numpad5" },
{ VK_NUMPAD6    , "Numpad6" },
{ VK_NUMPAD7    , "Numpad7" },
{ VK_NUMPAD8    , "Numpad8" },
{ VK_NUMPAD9    , "Numpad9" },
{ 'O'  ,					"O" },
{ VK_OEM_CLEAR  , "Oem_clear" },
{ 'P'  ,					"P" },
{ VK_PA1        , "Pa1" },
{ VK_PAUSE      , "Pause" },
{ VK_PLAY       , "Play" },
{ VK_PRINT      , "Print" },
{ VK_PRIOR      , "PageUp" },
{ VK_PROCESSKEY , "ProcessKey" },
{ 'Q'  ,					"Q" },
{ 'R'  ,					"R" },
{ VK_RBUTTON    , "RButton" },
{ VK_RCONTROL   , "RControl" },
{ VK_RETURN     , "Enter" },
{ VK_RIGHT      , "Right" },
{ VK_RMENU      , "RMenu" },
{ VK_RSHIFT     , "RShift" },
{ VK_RWIN       , "RWin" },
{ 'S'  ,					"S" },
{ VK_SCROLL     , "Scroll" },
{ VK_SELECT     , "Select" },
{ VK_SEPARATOR  , "Separator" },
{ VK_SHIFT      , "Shift" },
{ VK_SNAPSHOT   , "Snapshot" },
{ VK_SPACE      , "Space" },
{ VK_SUBTRACT   , "Subtract" },
{ 'T'  ,					"T" },
{ VK_TAB        , "Tab" },
{ 'U'  ,					"U" },
{ VK_UP         , "Up" },
{ 'V'  ,					"V" },
{ 'W'  ,					"W" },
{ 'X'  ,					"X" },
{ 'Y'  ,					"Y" },
{ 'Z'  ,					"Z" },
{ VK_ZOOM       , "Zoom" },

// extra stuff added 19 June 2006

{ VK_OEM_1      , ";" }  ,
{ VK_OEM_PLUS   , "+" } ,
{ VK_OEM_COMMA  , "," },
{ VK_OEM_MINUS  , "-" },
{ VK_OEM_PERIOD , "." },
{ VK_OEM_2      , "/" },
{ VK_OEM_3      , "`" },
{ VK_OEM_4      , "[" },
{ VK_OEM_5      , "\\" },
{ VK_OEM_6      , "]" },
{ VK_OEM_7      , "'" },

// note, things like '(' are really Shift+9

{ 0, 0 },    // end of table marker

};  // end of VirtualKeys table

