/****************************************************************************
*
*                            Open Watcom Project
*
*    Portions Copyright (c) 1983-2002 Sybase, Inc. All Rights Reserved.
*
*  ========================================================================
*
*    This file contains Original Code and/or Modifications of Original
*    Code as defined in and that are subject to the Sybase Open Watcom
*    Public License version 1.0 (the 'License'). You may not use this file
*    except in compliance with the License. BY USING THIS FILE YOU AGREE TO
*    ALL TERMS AND CONDITIONS OF THE LICENSE. A copy of the License is
*    provided with the Original Code and Modifications, and is also
*    available at www.sybase.com/developer/opensource.
*
*    The Original Code and all software distributed under the License are
*    distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
*    EXPRESS OR IMPLIED, AND SYBASE AND ALL CONTRIBUTORS HEREBY DISCLAIM
*    ALL SUCH WARRANTIES, INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF
*    MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR
*    NON-INFRINGEMENT. Please see the License for the specific language
*    governing rights and limitations under the License.
*
*  ========================================================================
*
* Description:  WHEN YOU FIGURE OUT WHAT THIS FILE DOES, PLEASE
*               DESCRIBE IT HERE!
*
****************************************************************************/


#include <stdio.h>
#include "vi.h"
#include "menu.h"
#include "ex.h"
#ifdef __WIN__
#include "winrtns.h"
#endif

/*                           non-modeless             non-modeless bits           modeless bits (events MISC & INS
 *          modeless      insert     command          (no restrictions)           ONLY unless matches non-ml event)
 *         /--------\   /--------------------\  /----------------------------\   /---------------------------------\
 */

event _NEAR EventList[] = {
/*   0 */ { InvalidKey, InvalidKey, InvalidKey, {EVENT_MISC, 0, 0, 0, 0, 0, 0}, {EVENT_MISC, 0, 0, 0, 0, 0, 0} },
/*  ^A */ { InvalidKey, InvalidKey, LineInfo, {EVENT_MISC, 0, 0, 0, 0, 0, 0}, {EVENT_MISC, 0, 0, 0, 0, 0, 0} },
/*  ^B */ { InvalidKey, InvalidKey, MovePageUp, {EVENT_MISC, 0, 0, 0, 0, 1, 0}, {EVENT_MISC, 0, 0, 0, 0, 0, 0} },
/*  ^C */ { AddSelRgnToSavebuf, InvalidKey, AddSelRgnToSavebuf, {EVENT_MISC, 1, 0, 0, 0, 0, 0}, {EVENT_MISC, 1, 0, 0, 0, 0, 0} },
/*  ^D */ { DoUndoUndo, IMTabs, MoveHalfPageDown, {EVENT_MISC, 0, 0, 0, 0, 1, 0}, {EVENT_MISC, 0, 0, 0, 0, 0, 0} },
/*  ^E */ { InvalidKey, IMCursorKey, MoveScreenDown, {EVENT_MISC, 0, 0, 0, 0, 0, 0}, {EVENT_MISC, 0, 0, 0, 0, 0, 0} },
/*  ^F */ { FancyDoFindMisc, InvalidKey, MovePageDown, {EVENT_MISC, 0, 0, 0, 0, 1, 0}, {EVENT_MISC, 0, 0, 0, 0, 0, 0} },
/*  ^G */ { InvalidKey, InvalidKey, DisplayFileStatus, {EVENT_MISC, 0, 0, 0, 0, 0, 0}, {EVENT_MISC, 0, 0, 0, 0, 0, 0} },
/*  ^H */ { InvalidKey, InvalidKey, InvalidKey, {EVENT_MISC, 0, 0, 0, 0, 0, 0}, {EVENT_MISC, 0, 0, 0, 0, 0, 0} },
/*  ^I */ { InvalidKey, IMTabs,     InvalidKey, {EVENT_MISC, 0, 0, 0, 0, 0, 0}, {EVENT_MISC, 0, 0, 0, 0, 0, 0} },
/*  ^J */ { InvalidKey, InvalidKey, InvalidKey, {EVENT_MISC, 0, 0, 0, 0, 0, 0}, {EVENT_MISC, 0, 0, 0, 0, 0, 0} },
/*  ^K */ { FancyProcessCommandLine, InvalidKey, FancyProcessCommandLine, {EVENT_MISC, 1, 0, 0, 0, 0, 0}, {EVENT_MISC, 1, 0, 0, 0, 0, 0} },
/*  ^L */ { ReDisplayScreen, InvalidKey, ReDisplayScreen, {EVENT_MISC, 0, 0, 0, 0, 0, 0}, {EVENT_MISC, 0, 0, 0, 0, 0, 0} },
/*  ^M */ { InvalidKey, InvalidKey, InvalidKey, {EVENT_MISC, 0, 0, 0, 0, 0, 0}, {EVENT_MISC, 0, 0, 0, 0, 0, 0} },
/*  ^N */ { DoNextFindForwardMisc, InvalidKey, MoveDown, {EVENT_REL_MOVE, 0, 0, 0, 0, 0, 0}, {EVENT_MISC, 0, 0, 0, 0, 0, 0} },
/*  ^O */ { DoMatching, InvalidKey, DoMatching, {EVENT_ABS_MOVE, 0, 0, 0, 0, 0, 0}, {EVENT_ABS_MOVE, 0, 0, 0, 0, 0, 0} },
/*  ^P */ { InvalidKey, InvalidKey, MoveUp, {EVENT_REL_MOVE, 0, 0, 0, 0, 0, 0}, {EVENT_REL_MOVE, 0, 0, 0, 0, 0, 0} },
/*  ^Q */ { InvalidKey, IMEscapeNextChar, InvalidKey, {EVENT_MISC, 0, 0, 0, 0, 0, 0}, {EVENT_MISC, 0, 0, 0, 0, 0, 0} },
/*  ^R */ { FancyDoReplace, IMCursorKey, ReselectRegion, {EVENT_MISC, 1, 0, 0, 0, 0, 0}, {EVENT_MISC, 0, 0, 0, 0, 0, 0} },
/*  ^S */ { FancyFileSave, IMMenuKey, FancyFileSave, {EVENT_MISC, 0, 0, 0, 0, 0, 0}, {EVENT_MISC, 0, 0, 0, 0, 0, 0} },
/*  ^T */ { InvalidKey, IMTabs, InvalidKey, {EVENT_MISC, 0, 0, 0, 0, 0, 0}, {EVENT_MISC, 0, 0, 0, 0, 0, 0} },
/*  ^U */ { DoNextFindBackwardsMisc, InvalidKey, MoveHalfPageUp, {EVENT_MISC, 0, 0, 0, 0, 1, 0}, {EVENT_MISC, 0, 0, 0, 0, 0, 0} },
/*  ^V */ { InsertSavebufBefore2, IMEscapeNextChar, DoVersion, {EVENT_MISC, 0, 0, 0, 0, 0, 0}, {EVENT_MISC, 1, 0, 0, 0, 0, 0} },
/*  ^W */ { InvalidKey, InvalidKey, InvalidKey, {EVENT_MISC, 0, 0, 0, 0, 0, 0}, {EVENT_MISC, 0, 0, 0, 0, 0, 0} },
/*  ^X */ { AddSelRgnToSavebufAndDelete, InvalidKey, PrintHexValue, {EVENT_MISC, 0, 0, 0, 0, 0, 0}, {EVENT_MISC, 1, 0, 0, 0, 0, 0} },
/*  ^Y */ { InvalidKey, IMCursorKey, MoveScreenUp, {EVENT_MISC, 0, 0, 0, 0, 0, 0}, {EVENT_MISC, 0, 0, 0, 0, 0, 0} },
/*  ^Z */ { DoUndo, InvalidKey, DoVersion, {EVENT_MISC, 0, 0, 0, 0, 0, 0}, {EVENT_MISC, 0, 0, 0, 0, 0, 0} },
/* '' */ { InvalidKey, InvalidKey, InvalidKey, {EVENT_MISC, 0, 0, 0, 0, 0, 0}, {EVENT_MISC, 0, 0, 0, 0, 0, 0} },
/* '' */ { InvalidKey, InvalidKey, InvalidKey, {EVENT_MISC, 0, 0, 0, 0, 0, 0}, {EVENT_MISC, 0, 0, 0, 0, 0, 0} },
/* '' */ { InvalidKey, InvalidKey, GetCurrentTag, {EVENT_MISC, 0, 0, 0, 0, 0, 0}, {EVENT_MISC, 0, 0, 0, 0, 0, 0} },
/* '' */ { InvalidKey, InvalidKey, InvalidKey, {EVENT_MISC, 0, 0, 0, 0, 0, 0}, {EVENT_MISC, 0, 0, 0, 0, 0, 0} },
/* '' */ { InvalidKey, InvalidKey, InvalidKey, {EVENT_MISC, 0, 0, 0, 0, 0, 0}, {EVENT_MISC, 0, 0, 0, 0, 0, 0} },
/* ' ' */ { IMSpace, IMSpace, MoveRight, {EVENT_REL_MOVE, 0, 0, 1, 0, 1, 0}, {EVENT_INS, 1, 0, 0, 0, 0, 0} },
/* '!' */ { IMChar, IMChar, Filter, {EVENT_OP, 1, 0, 0, 0, 0, 1}, {EVENT_INS, 1, 0, 0, 0, 0, 0} },
/* '"' */ { IMChar, IMChar, DoSavebufNumber, {EVENT_MISC, 1, 0, 0, 0, 0, 0}, {EVENT_INS, 1, 0, 0, 0, 0, 0} },
/* '#' */ { IMChar, IMChar, InvalidKey, {EVENT_MISC, 0, 0, 0, 0, 0, 0}, {EVENT_INS, 1, 0, 0, 0, 0, 0} },
/* '$' */ { IMChar, IMChar, MoveLineEnd, {EVENT_REL_MOVE, 0, 0, 0, 0, 0, 0}, {EVENT_INS, 1, 0, 0, 0, 0, 0} },
/* '%' */ { IMChar, IMChar, DoMatching, {EVENT_ABS_MOVE, 0, 0, 0, 0, 0, 0}, {EVENT_INS, 1, 0, 0, 0, 0, 0} },
/* '&' */ { IMChar, IMChar, InvalidKey, {EVENT_MISC, 0, 0, 0, 0, 0, 0}, {EVENT_INS, 1, 0, 0, 0, 0, 0} },
/* '\'' */ { IMChar, IMChar, GoMarkLine, {EVENT_ABS_MOVE, 0, 0, 0, 0, 0, 0}, {EVENT_INS, 1, 0, 0, 0, 0, 0} },
/* '(' */ { IMChar, IMChar, InvalidKey, {EVENT_MISC, 0, 0, 0, 0, 0, 0}, {EVENT_INS, 1, 0, 0, 0, 0, 0} },
/* ')' */ { IMCloseBracket, IMCloseBracket, InvalidKey, {EVENT_MISC, 0, 0, 0, 0, 0, 0}, {EVENT_INS, 1, 0, 0, 0, 0, 0} },
/* '*' */ { IMChar, IMChar, InvalidKey, {EVENT_MISC, 0, 0, 0, 0, 0, 0}, {EVENT_INS, 1, 0, 0, 0, 0, 0} },
/* '+' */ { IMChar, IMChar, MoveStartNextLine, {EVENT_REL_MOVE, 0, 0, 0, 0, 0, 0}, {EVENT_INS, 1, 0, 0, 0, 0, 0} },
/* ',' */ { IMChar, IMChar, MoveToLastCharFindRev, {EVENT_REL_MOVE, 0, 0, 0, 0, 0, 0}, {EVENT_INS, 1, 0, 0, 0, 0, 0} },
/* '-' */ { IMChar, IMChar, MoveStartPrevLine, {EVENT_REL_MOVE, 0, 0, 0, 0, 0, 0}, {EVENT_INS, 1, 0, 0, 0, 0, 0} },
/* '.' */ { IMChar, IMChar, DoDotMode, {EVENT_MISC, 1, 0, 0, 0, 0, 0}, {EVENT_INS, 1, 0, 0, 0, 0, 0} },
/* '/' */ { IMChar, IMChar, DoFindForward, {EVENT_ABS_MOVE, 1, 0, 0, 0, 0, 0}, {EVENT_INS, 1, 0, 0, 0, 0, 0} },
/* '0' */ { IMChar, IMChar, DoDigit, {EVENT_MISC, 0, 1, 0, 0, 0, 0}, {EVENT_INS, 1, 0, 0, 0, 0, 0} },
/* '1' */ { IMChar, IMChar, DoDigit, {EVENT_MISC, 0, 1, 0, 0, 0, 0}, {EVENT_INS, 1, 0, 0, 0, 0, 0} },
/* '2' */ { IMChar, IMChar, DoDigit, {EVENT_MISC, 0, 1, 0, 0, 0, 0}, {EVENT_INS, 1, 0, 0, 0, 0, 0} },
/* '3' */ { IMChar, IMChar, DoDigit, {EVENT_MISC, 0, 1, 0, 0, 0, 0}, {EVENT_INS, 1, 0, 0, 0, 0, 0} },
/* '4' */ { IMChar, IMChar, DoDigit, {EVENT_MISC, 0, 1, 0, 0, 0, 0}, {EVENT_INS, 1, 0, 0, 0, 0, 0} },
/* '5' */ { IMChar, IMChar, DoDigit, {EVENT_MISC, 0, 1, 0, 0, 0, 0}, {EVENT_INS, 1, 0, 0, 0, 0, 0} },
/* '6' */ { IMChar, IMChar, DoDigit, {EVENT_MISC, 0, 1, 0, 0, 0, 0}, {EVENT_INS, 1, 0, 0, 0, 0, 0} },
/* '7' */ { IMChar, IMChar, DoDigit, {EVENT_MISC, 0, 1, 0, 0, 0, 0}, {EVENT_INS, 1, 0, 0, 0, 0, 0} },
/* '8' */ { IMChar, IMChar, DoDigit, {EVENT_MISC, 0, 1, 0, 0, 0, 0}, {EVENT_INS, 1, 0, 0, 0, 0, 0} },
/* '9' */ { IMChar, IMChar, DoDigit, {EVENT_MISC, 0, 1, 0, 0, 0, 0}, {EVENT_INS, 1, 0, 0, 0, 0, 0} },
/* ':' */ { IMChar, IMChar, ProcessCommandLine, {EVENT_MISC, 1, 0, 0, 0, 0, 0}, {EVENT_INS, 1, 0, 0, 0, 0, 0} },
/* ';' */ { IMChar, IMChar, MoveToLastCharFind, {EVENT_REL_MOVE, 0, 0, 0, 0, 0, 0}, {EVENT_INS, 1, 0, 0, 0, 0, 0} },
/* '<' */ { IMChar, IMChar, StartSuck, {EVENT_OP, 1, 0, 0, 0, 0, 1}, {EVENT_INS, 1, 0, 0, 0, 0, 0} },
/* '=' */ { IMChar, IMChar, DoAltDotMode, {EVENT_MISC, 0, 0, 0, 0, 0, 0}, {EVENT_INS, 1, 0, 0, 0, 0, 0} },
/* '>' */ { IMChar, IMChar, StartShove, {EVENT_OP, 1, 0, 0, 0, 0, 1}, {EVENT_INS, 1, 0, 0, 0, 0, 0} },
/* '?' */ { IMChar, IMChar, DoFindBackwards, {EVENT_ABS_MOVE, 1, 0, 0, 0, 0, 0}, {EVENT_INS, 1, 0, 0, 0, 0, 0} },
/* '@' */ { IMChar, IMChar, ExecuteBuffer, {EVENT_MISC, 0, 0, 0, 0, 0, 0}, {EVENT_INS, 1, 0, 0, 0, 0, 0} },
/* 'A' */ { IMChar, IMChar, InsertTextAtLineEnd, {EVENT_MISC, 0, 0, 0, 0, 0, 0}, {EVENT_INS, 1, 0, 0, 0, 0, 0} },
/* 'B' */ { IMChar, IMChar, MoveBackwardsBigWord, {EVENT_REL_MOVE, 0, 0, 1, 0, 0, 0}, {EVENT_INS, 1, 0, 0, 0, 0, 0} },
/* 'C' */ { IMChar, IMChar, DoChangeLineEnd, {EVENT_OP, 0, 0, 0, 1, 0, 1}, {EVENT_INS, 1, 0, 0, 0, 0, 0} },
/* 'D' */ { IMChar, IMChar, DoDeleteLineEnd, {EVENT_OP, 0, 0, 0, 1, 0, 1}, {EVENT_INS, 1, 0, 0, 0, 0, 0} },
/* 'E' */ { IMChar, IMChar, MoveForwardBigWordEnd, {EVENT_REL_MOVE, 0, 0, 0, 0, 0, 0}, {EVENT_INS, 1, 0, 0, 0, 0, 0} },
/* 'F' */ { IMChar, IMChar, MoveBackToChar, {EVENT_REL_MOVE, 0, 0, 0, 0, 0, 0}, {EVENT_INS, 1, 0, 0, 0, 0, 0} },
/* 'G' */ { IMChar, IMChar, DoGo, {EVENT_ABS_MOVE, 0, 0, 0, 0, 0, 0}, {EVENT_INS, 1, 0, 0, 0, 0, 0} },
/* 'H' */ { IMChar, IMChar, MovePageTop, {EVENT_ABS_MOVE, 0, 0, 0, 0, 0, 0}, {EVENT_INS, 1, 0, 0, 0, 0, 0} },
/* 'I' */ { IMChar, IMChar, InsertTextAtLineStart, {EVENT_MISC, 0, 0, 0, 0, 0, 0}, {EVENT_INS, 1, 0, 0, 0, 0, 0} },
/* 'J' */ { IMChar, IMChar, JoinCurrentLineToNext, {EVENT_MISC, 0, 0, 0, 0, 0, 0}, {EVENT_INS, 1, 0, 0, 0, 0, 0} },
/* 'K' */ { IMChar, IMChar, InvalidKey, {EVENT_MISC, 0, 0, 0, 0, 0, 0}, {EVENT_INS, 1, 0, 0, 0, 0, 0} },
/* 'L' */ { IMChar, IMChar, MovePageBottom, {EVENT_ABS_MOVE, 0, 0, 0, 0, 0, 0}, {EVENT_INS, 1, 0, 0, 0, 0, 0} },
/* 'M' */ { IMChar, IMChar, MovePageMiddle, {EVENT_ABS_MOVE, 0, 0, 0, 0, 0, 0}, {EVENT_INS, 1, 0, 0, 0, 0, 0} },
/* 'N' */ { IMChar, IMChar, DoNextFindBackwards, {EVENT_ABS_MOVE, 0, 0, 0, 0, 0, 0}, {EVENT_INS, 1, 0, 0, 0, 0, 0} },
/* 'O' */ { IMChar, IMChar, InsertTextOnPreviousLine, {EVENT_MISC, 0, 0, 0, 0, 0, 0}, {EVENT_INS, 1, 0, 0, 0, 0, 0} },
/* 'P' */ { IMChar, IMChar, InsertSavebufBefore, {EVENT_MISC, 0, 0, 0, 0, 0, 0}, {EVENT_INS, 1, 0, 0, 0, 0, 0} },
#ifdef __WIN__
/* 'Q' */ { IMChar, IMChar, InvalidKey, {EVENT_MISC, 0, 0, 0, 0, 0, 0}, {EVENT_INS, 1, 0, 0, 0, 0, 0} },
#else
/* 'Q' */ { IMChar, IMChar, EnterExMode, {EVENT_MISC, 0, 0, 0, 0, 0, 0}, {EVENT_INS, 1, 0, 0, 0, 0, 0} },
#endif
/* 'R' */ { IMChar, IMChar, DoReplaceText, {EVENT_MISC, 0, 0, 0, 0, 0, 0}, {EVENT_INS, 1, 0, 0, 0, 0, 0} },
/* 'S' */ { IMChar, IMChar, DoLineSubstitute, {EVENT_OP, 0, 0, 0, 1, 0, 1}, {EVENT_INS, 1, 0, 0, 0, 0, 0} },
/* 'T' */ { IMChar, IMChar, MoveBackToAfterChar, {EVENT_REL_MOVE, 0, 0, 0, 0, 0, 0}, {EVENT_INS, 1, 0, 0, 0, 0, 0} },
/* 'U' */ { IMChar, IMChar, DoUndoUndo, {EVENT_MISC, 0, 0, 0, 0, 0, 0}, {EVENT_INS, 1, 0, 0, 0, 0, 0} },
/* 'V' */ { IMChar, IMChar, InvalidKey, {EVENT_MISC, 0, 0, 0, 0, 0, 0}, {EVENT_INS, 1, 0, 0, 0, 0, 0} },
/* 'W' */ { IMChar, IMChar, MoveForwardBigWord, {EVENT_REL_MOVE, 0, 0, 1, 0, 0, 0}, {EVENT_INS, 1, 0, 0, 0, 0, 0} },
/* 'X' */ { IMChar, IMChar, DoDeleteCharBeforeCursor, {EVENT_OP, 1, 0, 0, 1, 0, 1}, {EVENT_INS, 1, 0, 0, 0, 0, 0} },
/* 'Y' */ { IMChar, IMChar, YankLines, {EVENT_MISC, 0, 0, 0, 0, 0, 0}, {EVENT_INS, 1, 0, 0, 0, 0, 0} },
/* 'Z' */ { IMChar, IMChar, StartSaveExit, {EVENT_MISC, 0, 0, 0, 0, 0, 0}, {EVENT_INS, 1, 0, 0, 0, 0, 0} },
/* '[' */ { IMChar, IMChar, InvalidKey, {EVENT_MISC, 0, 0, 0, 0, 0, 0}, {EVENT_INS, 1, 0, 0, 0, 0, 0} },
/* '\' */ { IMChar, IMChar, InvalidKey, {EVENT_MISC, 0, 0, 0, 0, 0, 0}, {EVENT_INS, 1, 0, 0, 0, 0, 0} },
/* ']' */ { IMChar, IMChar, InvalidKey, {EVENT_MISC, 0, 0, 0, 0, 0, 0}, {EVENT_INS, 1, 0, 0, 0, 0, 0} },
/* '^' */ { IMChar, IMChar, MoveStartOfLine, {EVENT_REL_MOVE, 0, 0, 0, 0, 0, 0}, {EVENT_INS, 1, 0, 0, 0, 0, 0} },
/* '_' */ { IMChar, IMChar, DoSelectSelectionPopMenu, {EVENT_MISC, 1, 0, 0, 0, 0, 0}, {EVENT_INS, 1, 0, 0, 0, 0, 0} },
/* '`' */ { IMChar, IMChar, GoMark, {EVENT_ABS_MOVE, 0, 0, 0, 0, 0, 0}, {EVENT_INS, 1, 0, 0, 0, 0, 0} },
/* 'a' */ { IMChar, IMChar, InsertTextAfterCursor, {EVENT_MISC, 0, 0, 0, 0, 0, 0}, {EVENT_INS, 1, 0, 0, 0, 0, 0} },
/* 'b' */ { IMChar, IMChar, MoveBackwardsWord, {EVENT_REL_MOVE, 0, 0, 1, 0, 0, 0}, {EVENT_INS, 1, 0, 0, 0, 0, 0} },
/* 'c' */ { IMChar, IMChar, Change, {EVENT_OP, 1, 0, 0, 0, 0, 1}, {EVENT_INS, 1, 0, 0, 0, 0, 0} },
/* 'd' */ { IMChar, IMChar, Delete, {EVENT_OP, 1, 0, 0, 0, 0, 1}, {EVENT_INS, 1, 0, 0, 0, 0, 0} },
/* 'e' */ { IMChar, IMChar, MoveForwardWordEnd, {EVENT_REL_MOVE, 0, 0, 0, 0, 0, 0}, {EVENT_INS, 1, 0, 0, 0, 0, 0} },
/* 'f' */ { IMChar, IMChar, MoveUpToChar, {EVENT_REL_MOVE, 0, 0, 0, 0, 0, 0}, {EVENT_INS, 1, 0, 0, 0, 0, 0} },
/* 'g' */ { IMChar, IMChar, InsertLikeLast, {EVENT_MISC, 0, 0, 0, 0, 0, 0}, {EVENT_INS, 1, 0, 0, 0, 0, 0} },
/* 'h' */ { IMChar, IMChar, MoveLeft, {EVENT_REL_MOVE, 0, 0, 1, 0, 1, 0}, {EVENT_INS, 1, 0, 0, 0, 0, 0} },
/* 'i' */ { IMChar, IMChar, InsertTextAtCursor, {EVENT_MISC, 0, 0, 0, 0, 0, 0}, {EVENT_INS, 1, 0, 0, 0, 0, 0} },
/* 'j' */ { IMChar, IMChar, MoveDown, {EVENT_REL_MOVE, 0, 0, 0, 0, 1, 0}, {EVENT_INS, 1, 0, 0, 0, 0, 0} },
/* 'k' */ { IMChar, IMChar, MoveUp, {EVENT_REL_MOVE, 0, 0, 0, 0, 1, 0}, {EVENT_INS, 1, 0, 0, 0, 0, 0} },
/* 'l' */ { IMChar, IMChar, MoveRight, {EVENT_REL_MOVE, 0, 0, 1, 0, 1, 0}, {EVENT_INS, 1, 0, 0, 0, 0, 0} },
/* 'm' */ { IMChar, IMChar, SetMark, {EVENT_MISC, 0, 0, 0, 0, 0, 0}, {EVENT_INS, 1, 0, 0, 0, 0, 0} },
/* 'n' */ { IMChar, IMChar, DoNextFindForward, {EVENT_ABS_MOVE, 0, 0, 0, 0, 0, 0}, {EVENT_INS, 1, 0, 0, 0, 0, 0} },
/* 'o' */ { IMChar, IMChar, InsertTextOnNextLine, {EVENT_MISC, 0, 0, 0, 0, 0, 0}, {EVENT_INS, 1, 0, 0, 0, 0, 0} },
/* 'p' */ { IMChar, IMChar, InsertSavebufAfter, {EVENT_MISC, 0, 0, 0, 0, 0, 0}, {EVENT_INS, 1, 0, 0, 0, 0, 0} },
/* 'q' */ { IMChar, IMChar, SetSelectedRegion, {EVENT_OP, 1, 0, 0, 0, 0, 0}, {EVENT_INS, 1, 0, 0, 0, 0, 0} },
/* 'r' */ { IMChar, IMChar, ReplaceChar, {EVENT_MISC, 0, 0, 0, 0, 0, 0}, {EVENT_INS, 1, 0, 0, 0, 0, 0} },
/* 's' */ { IMChar, IMChar, DoSubstitute, {EVENT_OP, 0, 0, 0, 1, 0, 1}, {EVENT_INS, 1, 0, 0, 0, 0, 0} },
/* 't' */ { IMChar, IMChar, MoveUpToBeforeChar, {EVENT_REL_MOVE, 0, 0, 0, 0, 0, 0}, {EVENT_INS, 1, 0, 0, 0, 0, 0} },
/* 'u' */ { IMChar, IMChar, DoUndo, {EVENT_MISC, 0, 0, 0, 0, 0, 0}, {EVENT_INS, 1, 0, 0, 0, 0, 0} },
/* 'v' */ { IMChar, IMChar, InvalidKey, {EVENT_MISC, 0, 0, 0, 0, 0, 0}, {EVENT_INS, 1, 0, 0, 0, 0, 0} },
/* 'w' */ { IMChar, IMChar, MoveForwardWord, {EVENT_REL_MOVE, 0, 0, 1, 0, 0, 0}, {EVENT_INS, 1, 0, 0, 0, 0, 0} },
/* 'x' */ { IMChar, IMChar, DoDeleteCharAtCursor, {EVENT_OP, 1, 0, 0, 1, 0, 1}, {EVENT_INS, 1, 0, 0, 0, 0, 0} },
/* 'y' */ { IMChar, IMChar, Yank, {EVENT_OP, 1, 0, 0, 0, 0, 0}, {EVENT_INS, 1, 0, 0, 0, 0, 0} },
/* 'z' */ { IMChar, IMChar, MovePosition, {EVENT_MISC, 0, 0, 0, 0, 0, 0}, {EVENT_INS, 1, 0, 0, 0, 0, 0} },
/* '{' */ { IMChar, IMChar, InvalidKey, {EVENT_MISC, 0, 0, 0, 0, 0, 0}, {EVENT_INS, 1, 0, 0, 0, 0, 0} },
/* '|' */ { IMChar, IMChar, MoveToColumn, {EVENT_REL_MOVE, 0, 0, 0, 0, 0, 0}, {EVENT_INS, 1, 0, 0, 0, 0, 0} },
/* '}' */ { IMCloseBrace, IMCloseBrace, InvalidKey, {EVENT_MISC, 0, 0, 0, 0, 0, 0}, {EVENT_INS, 1, 0, 0, 0, 0, 0} },
/* '~' */ { IMChar, IMChar, ChangeCase, {EVENT_OP, 1, 0, 0, 0, 0, 1}, {EVENT_INS, 1, 0, 0, 0, 0, 0} },
/* '' */ { IMChar, InvalidKey, InvalidKey, {EVENT_MISC, 0, 0, 0, 0, 0, 0}, {EVENT_INS, 1, 0, 0, 0, 0, 0} },
#ifdef __NT__
/* 'Ç' */ { IMChar, AbsoluteNullResponse, AbsoluteNullResponse, {EVENT_MISC, 0, 0, 0, 0, 0, 0}, {EVENT_INS, 1, 0, 0, 0, 0, 0} },
#else
/* 'Ç' */ { IMChar, InvalidKey, InvalidKey, {EVENT_MISC, 0, 0, 0, 0, 0, 0}, {EVENT_INS, 1, 0, 0, 0, 0, 0} },
#endif

/*
 * now the special function keys
 */
#ifdef __WIN__
        /* add another chunk of 128 - to support foreign characters */
        /* 0x0081-0x00ff - characters */
        /* 0x0100-0x017f - function keys etc. */

/* 129 */ { IMChar, IMChar, InvalidKey, {EVENT_MISC, 0, 0, 0, 0, 0, 0}, {EVENT_INS, 1, 0, 0, 0, 0, 0} },
/* 130 */ { IMChar, IMChar, InvalidKey, {EVENT_MISC, 0, 0, 0, 0, 0, 0}, {EVENT_INS, 1, 0, 0, 0, 0, 0} },
/* 131 */ { IMChar, IMChar, InvalidKey, {EVENT_MISC, 0, 0, 0, 0, 0, 0}, {EVENT_INS, 1, 0, 0, 0, 0, 0} },
/* 132 */ { IMChar, IMChar, InvalidKey, {EVENT_MISC, 0, 0, 0, 0, 0, 0}, {EVENT_INS, 1, 0, 0, 0, 0, 0} },
/* 133 */ { IMChar, IMChar, InvalidKey, {EVENT_MISC, 0, 0, 0, 0, 0, 0}, {EVENT_INS, 1, 0, 0, 0, 0, 0} },
/* 134 */ { IMChar, IMChar, InvalidKey, {EVENT_MISC, 0, 0, 0, 0, 0, 0}, {EVENT_INS, 1, 0, 0, 0, 0, 0} },
/* 135 */ { IMChar, IMChar, InvalidKey, {EVENT_MISC, 0, 0, 0, 0, 0, 0}, {EVENT_INS, 1, 0, 0, 0, 0, 0} },
/* 136 */ { IMChar, IMChar, InvalidKey, {EVENT_MISC, 0, 0, 0, 0, 0, 0}, {EVENT_INS, 1, 0, 0, 0, 0, 0} },
/* 137 */ { IMChar, IMChar, InvalidKey, {EVENT_MISC, 0, 0, 0, 0, 0, 0}, {EVENT_INS, 1, 0, 0, 0, 0, 0} },
/* 138 */ { IMChar, IMChar, InvalidKey, {EVENT_MISC, 0, 0, 0, 0, 0, 0}, {EVENT_INS, 1, 0, 0, 0, 0, 0} },
/* 139 */ { IMChar, IMChar, InvalidKey, {EVENT_MISC, 0, 0, 0, 0, 0, 0}, {EVENT_INS, 1, 0, 0, 0, 0, 0} },
/* 140 */ { IMChar, IMChar, InvalidKey, {EVENT_MISC, 0, 0, 0, 0, 0, 0}, {EVENT_INS, 1, 0, 0, 0, 0, 0} },
/* 141 */ { IMChar, IMChar, InvalidKey, {EVENT_MISC, 0, 0, 0, 0, 0, 0}, {EVENT_INS, 1, 0, 0, 0, 0, 0} },
/* 142 */ { IMChar, IMChar, InvalidKey, {EVENT_MISC, 0, 0, 0, 0, 0, 0}, {EVENT_INS, 1, 0, 0, 0, 0, 0} },
/* 143 */ { IMChar, IMChar, InvalidKey, {EVENT_MISC, 0, 0, 0, 0, 0, 0}, {EVENT_INS, 1, 0, 0, 0, 0, 0} },
/* 144 */ { IMChar, IMChar, InvalidKey, {EVENT_MISC, 0, 0, 0, 0, 0, 0}, {EVENT_INS, 1, 0, 0, 0, 0, 0} },
/* 145 */ { IMChar, IMChar, InvalidKey, {EVENT_MISC, 0, 0, 0, 0, 0, 0}, {EVENT_INS, 1, 0, 0, 0, 0, 0} },
/* 146 */ { IMChar, IMChar, InvalidKey, {EVENT_MISC, 0, 0, 0, 0, 0, 0}, {EVENT_INS, 1, 0, 0, 0, 0, 0} },
/* 147 */ { IMChar, IMChar, InvalidKey, {EVENT_MISC, 0, 0, 0, 0, 0, 0}, {EVENT_INS, 1, 0, 0, 0, 0, 0} },
/* 148 */ { IMChar, IMChar, InvalidKey, {EVENT_MISC, 0, 0, 0, 0, 0, 0}, {EVENT_INS, 1, 0, 0, 0, 0, 0} },
/* 149 */ { IMChar, IMChar, InvalidKey, {EVENT_MISC, 0, 0, 0, 0, 0, 0}, {EVENT_INS, 1, 0, 0, 0, 0, 0} },
/* 150 */ { IMChar, IMChar, InvalidKey, {EVENT_MISC, 0, 0, 0, 0, 0, 0}, {EVENT_INS, 1, 0, 0, 0, 0, 0} },
/* 151 */ { IMChar, IMChar, InvalidKey, {EVENT_MISC, 0, 0, 0, 0, 0, 0}, {EVENT_INS, 1, 0, 0, 0, 0, 0} },
/* 152 */ { IMChar, IMChar, InvalidKey, {EVENT_MISC, 0, 0, 0, 0, 0, 0}, {EVENT_INS, 1, 0, 0, 0, 0, 0} },
/* 153 */ { IMChar, IMChar, InvalidKey, {EVENT_MISC, 0, 0, 0, 0, 0, 0}, {EVENT_INS, 1, 0, 0, 0, 0, 0} },
/* 154 */ { IMChar, IMChar, InvalidKey, {EVENT_MISC, 0, 0, 0, 0, 0, 0}, {EVENT_INS, 1, 0, 0, 0, 0, 0} },
/* 155 */ { IMChar, IMChar, InvalidKey, {EVENT_MISC, 0, 0, 0, 0, 0, 0}, {EVENT_INS, 1, 0, 0, 0, 0, 0} },
/* 156 */ { IMChar, IMChar, InvalidKey, {EVENT_MISC, 0, 0, 0, 0, 0, 0}, {EVENT_INS, 1, 0, 0, 0, 0, 0} },
/* 157 */ { IMChar, IMChar, InvalidKey, {EVENT_MISC, 0, 0, 0, 0, 0, 0}, {EVENT_INS, 1, 0, 0, 0, 0, 0} },
/* 158 */ { IMChar, IMChar, InvalidKey, {EVENT_MISC, 0, 0, 0, 0, 0, 0}, {EVENT_INS, 1, 0, 0, 0, 0, 0} },
/* 159 */ { IMChar, IMChar, InvalidKey, {EVENT_MISC, 0, 0, 0, 0, 0, 0}, {EVENT_INS, 1, 0, 0, 0, 0, 0} },
/* 160 */ { IMChar, IMChar, InvalidKey, {EVENT_MISC, 0, 0, 0, 0, 0, 0}, {EVENT_INS, 1, 0, 0, 0, 0, 0} },
/* 161 */ { IMChar, IMChar, InvalidKey, {EVENT_MISC, 0, 0, 0, 0, 0, 0}, {EVENT_INS, 1, 0, 0, 0, 0, 0} },
/* 162 */ { IMChar, IMChar, InvalidKey, {EVENT_MISC, 0, 0, 0, 0, 0, 0}, {EVENT_INS, 1, 0, 0, 0, 0, 0} },
/* 163 */ { IMChar, IMChar, InvalidKey, {EVENT_MISC, 0, 0, 0, 0, 0, 0}, {EVENT_INS, 1, 0, 0, 0, 0, 0} },
/* 164 */ { IMChar, IMChar, InvalidKey, {EVENT_MISC, 0, 0, 0, 0, 0, 0}, {EVENT_INS, 1, 0, 0, 0, 0, 0} },
/* 165 */ { IMChar, IMChar, InvalidKey, {EVENT_MISC, 0, 0, 0, 0, 0, 0}, {EVENT_INS, 1, 0, 0, 0, 0, 0} },
/* 166 */ { IMChar, IMChar, InvalidKey, {EVENT_MISC, 0, 0, 0, 0, 0, 0}, {EVENT_INS, 1, 0, 0, 0, 0, 0} },
/* 167 */ { IMChar, IMChar, InvalidKey, {EVENT_MISC, 0, 0, 0, 0, 0, 0}, {EVENT_INS, 1, 0, 0, 0, 0, 0} },
/* 168 */ { IMChar, IMChar, InvalidKey, {EVENT_MISC, 0, 0, 0, 0, 0, 0}, {EVENT_INS, 1, 0, 0, 0, 0, 0} },
/* 169 */ { IMChar, IMChar, InvalidKey, {EVENT_MISC, 0, 0, 0, 0, 0, 0}, {EVENT_INS, 1, 0, 0, 0, 0, 0} },
/* 170 */ { IMChar, IMChar, InvalidKey, {EVENT_MISC, 0, 0, 0, 0, 0, 0}, {EVENT_INS, 1, 0, 0, 0, 0, 0} },
/* 171 */ { IMChar, IMChar, InvalidKey, {EVENT_MISC, 0, 0, 0, 0, 0, 0}, {EVENT_INS, 1, 0, 0, 0, 0, 0} },
/* 172 */ { IMChar, IMChar, InvalidKey, {EVENT_MISC, 0, 0, 0, 0, 0, 0}, {EVENT_INS, 1, 0, 0, 0, 0, 0} },
/* 173 */ { IMChar, IMChar, InvalidKey, {EVENT_MISC, 0, 0, 0, 0, 0, 0}, {EVENT_INS, 1, 0, 0, 0, 0, 0} },
/* 174 */ { IMChar, IMChar, InvalidKey, {EVENT_MISC, 0, 0, 0, 0, 0, 0}, {EVENT_INS, 1, 0, 0, 0, 0, 0} },
/* 175 */ { IMChar, IMChar, InvalidKey, {EVENT_MISC, 0, 0, 0, 0, 0, 0}, {EVENT_INS, 1, 0, 0, 0, 0, 0} },
/* 176 */ { IMChar, IMChar, InvalidKey, {EVENT_MISC, 0, 0, 0, 0, 0, 0}, {EVENT_INS, 1, 0, 0, 0, 0, 0} },
/* 177 */ { IMChar, IMChar, InvalidKey, {EVENT_MISC, 0, 0, 0, 0, 0, 0}, {EVENT_INS, 1, 0, 0, 0, 0, 0} },
/* 178 */ { IMChar, IMChar, InvalidKey, {EVENT_MISC, 0, 0, 0, 0, 0, 0}, {EVENT_INS, 1, 0, 0, 0, 0, 0} },
/* 179 */ { IMChar, IMChar, InvalidKey, {EVENT_MISC, 0, 0, 0, 0, 0, 0}, {EVENT_INS, 1, 0, 0, 0, 0, 0} },
/* 180 */ { IMChar, IMChar, InvalidKey, {EVENT_MISC, 0, 0, 0, 0, 0, 0}, {EVENT_INS, 1, 0, 0, 0, 0, 0} },
/* 181 */ { IMChar, IMChar, InvalidKey, {EVENT_MISC, 0, 0, 0, 0, 0, 0}, {EVENT_INS, 1, 0, 0, 0, 0, 0} },
/* 182 */ { IMChar, IMChar, InvalidKey, {EVENT_MISC, 0, 0, 0, 0, 0, 0}, {EVENT_INS, 1, 0, 0, 0, 0, 0} },
/* 183 */ { IMChar, IMChar, InvalidKey, {EVENT_MISC, 0, 0, 0, 0, 0, 0}, {EVENT_INS, 1, 0, 0, 0, 0, 0} },
/* 184 */ { IMChar, IMChar, InvalidKey, {EVENT_MISC, 0, 0, 0, 0, 0, 0}, {EVENT_INS, 1, 0, 0, 0, 0, 0} },
/* 185 */ { IMChar, IMChar, InvalidKey, {EVENT_MISC, 0, 0, 0, 0, 0, 0}, {EVENT_INS, 1, 0, 0, 0, 0, 0} },
/* 186 */ { IMChar, IMChar, InvalidKey, {EVENT_MISC, 0, 0, 0, 0, 0, 0}, {EVENT_INS, 1, 0, 0, 0, 0, 0} },
/* 187 */ { IMChar, IMChar, InvalidKey, {EVENT_MISC, 0, 0, 0, 0, 0, 0}, {EVENT_INS, 1, 0, 0, 0, 0, 0} },
/* 188 */ { IMChar, IMChar, InvalidKey, {EVENT_MISC, 0, 0, 0, 0, 0, 0}, {EVENT_INS, 1, 0, 0, 0, 0, 0} },
/* 189 */ { IMChar, IMChar, InvalidKey, {EVENT_MISC, 0, 0, 0, 0, 0, 0}, {EVENT_INS, 1, 0, 0, 0, 0, 0} },
/* 190 */ { IMChar, IMChar, InvalidKey, {EVENT_MISC, 0, 0, 0, 0, 0, 0}, {EVENT_INS, 1, 0, 0, 0, 0, 0} },
/* 191 */ { IMChar, IMChar, InvalidKey, {EVENT_MISC, 0, 0, 0, 0, 0, 0}, {EVENT_INS, 1, 0, 0, 0, 0, 0} },
/* 192 */ { IMChar, IMChar, InvalidKey, {EVENT_MISC, 0, 0, 0, 0, 0, 0}, {EVENT_INS, 1, 0, 0, 0, 0, 0} },
/* 193 */ { IMChar, IMChar, InvalidKey, {EVENT_MISC, 0, 0, 0, 0, 0, 0}, {EVENT_INS, 1, 0, 0, 0, 0, 0} },
/* 194 */ { IMChar, IMChar, InvalidKey, {EVENT_MISC, 0, 0, 0, 0, 0, 0}, {EVENT_INS, 1, 0, 0, 0, 0, 0} },
/* 195 */ { IMChar, IMChar, InvalidKey, {EVENT_MISC, 0, 0, 0, 0, 0, 0}, {EVENT_INS, 1, 0, 0, 0, 0, 0} },
/* 196 */ { IMChar, IMChar, InvalidKey, {EVENT_MISC, 0, 0, 0, 0, 0, 0}, {EVENT_INS, 1, 0, 0, 0, 0, 0} },
/* 197 */ { IMChar, IMChar, InvalidKey, {EVENT_MISC, 0, 0, 0, 0, 0, 0}, {EVENT_INS, 1, 0, 0, 0, 0, 0} },
/* 198 */ { IMChar, IMChar, InvalidKey, {EVENT_MISC, 0, 0, 0, 0, 0, 0}, {EVENT_INS, 1, 0, 0, 0, 0, 0} },
/* 199 */ { IMChar, IMChar, InvalidKey, {EVENT_MISC, 0, 0, 0, 0, 0, 0}, {EVENT_INS, 1, 0, 0, 0, 0, 0} },
/* 200 */ { IMChar, IMChar, InvalidKey, {EVENT_MISC, 0, 0, 0, 0, 0, 0}, {EVENT_INS, 1, 0, 0, 0, 0, 0} },
/* 201 */ { IMChar, IMChar, InvalidKey, {EVENT_MISC, 0, 0, 0, 0, 0, 0}, {EVENT_INS, 1, 0, 0, 0, 0, 0} },
/* 202 */ { IMChar, IMChar, InvalidKey, {EVENT_MISC, 0, 0, 0, 0, 0, 0}, {EVENT_INS, 1, 0, 0, 0, 0, 0} },
/* 203 */ { IMChar, IMChar, InvalidKey, {EVENT_MISC, 0, 0, 0, 0, 0, 0}, {EVENT_INS, 1, 0, 0, 0, 0, 0} },
/* 204 */ { IMChar, IMChar, InvalidKey, {EVENT_MISC, 0, 0, 0, 0, 0, 0}, {EVENT_INS, 1, 0, 0, 0, 0, 0} },
/* 205 */ { IMChar, IMChar, InvalidKey, {EVENT_MISC, 0, 0, 0, 0, 0, 0}, {EVENT_INS, 1, 0, 0, 0, 0, 0} },
/* 206 */ { IMChar, IMChar, InvalidKey, {EVENT_MISC, 0, 0, 0, 0, 0, 0}, {EVENT_INS, 1, 0, 0, 0, 0, 0} },
/* 207 */ { IMChar, IMChar, InvalidKey, {EVENT_MISC, 0, 0, 0, 0, 0, 0}, {EVENT_INS, 1, 0, 0, 0, 0, 0} },
/* 208 */ { IMChar, IMChar, InvalidKey, {EVENT_MISC, 0, 0, 0, 0, 0, 0}, {EVENT_INS, 1, 0, 0, 0, 0, 0} },
/* 209 */ { IMChar, IMChar, InvalidKey, {EVENT_MISC, 0, 0, 0, 0, 0, 0}, {EVENT_INS, 1, 0, 0, 0, 0, 0} },
/* 210 */ { IMChar, IMChar, InvalidKey, {EVENT_MISC, 0, 0, 0, 0, 0, 0}, {EVENT_INS, 1, 0, 0, 0, 0, 0} },
/* 211 */ { IMChar, IMChar, InvalidKey, {EVENT_MISC, 0, 0, 0, 0, 0, 0}, {EVENT_INS, 1, 0, 0, 0, 0, 0} },
/* 212 */ { IMChar, IMChar, InvalidKey, {EVENT_MISC, 0, 0, 0, 0, 0, 0}, {EVENT_INS, 1, 0, 0, 0, 0, 0} },
/* 213 */ { IMChar, IMChar, InvalidKey, {EVENT_MISC, 0, 0, 0, 0, 0, 0}, {EVENT_INS, 1, 0, 0, 0, 0, 0} },
/* 214 */ { IMChar, IMChar, InvalidKey, {EVENT_MISC, 0, 0, 0, 0, 0, 0}, {EVENT_INS, 1, 0, 0, 0, 0, 0} },
/* 215 */ { IMChar, IMChar, InvalidKey, {EVENT_MISC, 0, 0, 0, 0, 0, 0}, {EVENT_INS, 1, 0, 0, 0, 0, 0} },
/* 216 */ { IMChar, IMChar, InvalidKey, {EVENT_MISC, 0, 0, 0, 0, 0, 0}, {EVENT_INS, 1, 0, 0, 0, 0, 0} },
/* 217 */ { IMChar, IMChar, InvalidKey, {EVENT_MISC, 0, 0, 0, 0, 0, 0}, {EVENT_INS, 1, 0, 0, 0, 0, 0} },
/* 218 */ { IMChar, IMChar, InvalidKey, {EVENT_MISC, 0, 0, 0, 0, 0, 0}, {EVENT_INS, 1, 0, 0, 0, 0, 0} },
/* 219 */ { IMChar, IMChar, InvalidKey, {EVENT_MISC, 0, 0, 0, 0, 0, 0}, {EVENT_INS, 1, 0, 0, 0, 0, 0} },
/* 220 */ { IMChar, IMChar, InvalidKey, {EVENT_MISC, 0, 0, 0, 0, 0, 0}, {EVENT_INS, 1, 0, 0, 0, 0, 0} },
/* 221 */ { IMChar, IMChar, InvalidKey, {EVENT_MISC, 0, 0, 0, 0, 0, 0}, {EVENT_INS, 1, 0, 0, 0, 0, 0} },
/* 222 */ { IMChar, IMChar, InvalidKey, {EVENT_MISC, 0, 0, 0, 0, 0, 0}, {EVENT_INS, 1, 0, 0, 0, 0, 0} },
/* 223 */ { IMChar, IMChar, InvalidKey, {EVENT_MISC, 0, 0, 0, 0, 0, 0}, {EVENT_INS, 1, 0, 0, 0, 0, 0} },
/* 224 */ { IMChar, IMChar, InvalidKey, {EVENT_MISC, 0, 0, 0, 0, 0, 0}, {EVENT_INS, 1, 0, 0, 0, 0, 0} },
/* 225 */ { IMChar, IMChar, InvalidKey, {EVENT_MISC, 0, 0, 0, 0, 0, 0}, {EVENT_INS, 1, 0, 0, 0, 0, 0} },
/* 226 */ { IMChar, IMChar, InvalidKey, {EVENT_MISC, 0, 0, 0, 0, 0, 0}, {EVENT_INS, 1, 0, 0, 0, 0, 0} },
/* 227 */ { IMChar, IMChar, InvalidKey, {EVENT_MISC, 0, 0, 0, 0, 0, 0}, {EVENT_INS, 1, 0, 0, 0, 0, 0} },
/* 228 */ { IMChar, IMChar, InvalidKey, {EVENT_MISC, 0, 0, 0, 0, 0, 0}, {EVENT_INS, 1, 0, 0, 0, 0, 0} },
/* 229 */ { IMChar, IMChar, InvalidKey, {EVENT_MISC, 0, 0, 0, 0, 0, 0}, {EVENT_INS, 1, 0, 0, 0, 0, 0} },
/* 230 */ { IMChar, IMChar, InvalidKey, {EVENT_MISC, 0, 0, 0, 0, 0, 0}, {EVENT_INS, 1, 0, 0, 0, 0, 0} },
/* 231 */ { IMChar, IMChar, InvalidKey, {EVENT_MISC, 0, 0, 0, 0, 0, 0}, {EVENT_INS, 1, 0, 0, 0, 0, 0} },
/* 232 */ { IMChar, IMChar, InvalidKey, {EVENT_MISC, 0, 0, 0, 0, 0, 0}, {EVENT_INS, 1, 0, 0, 0, 0, 0} },
/* 233 */ { IMChar, IMChar, InvalidKey, {EVENT_MISC, 0, 0, 0, 0, 0, 0}, {EVENT_INS, 1, 0, 0, 0, 0, 0} },
/* 234 */ { IMChar, IMChar, InvalidKey, {EVENT_MISC, 0, 0, 0, 0, 0, 0}, {EVENT_INS, 1, 0, 0, 0, 0, 0} },
/* 235 */ { IMChar, IMChar, InvalidKey, {EVENT_MISC, 0, 0, 0, 0, 0, 0}, {EVENT_INS, 1, 0, 0, 0, 0, 0} },
/* 236 */ { IMChar, IMChar, InvalidKey, {EVENT_MISC, 0, 0, 0, 0, 0, 0}, {EVENT_INS, 1, 0, 0, 0, 0, 0} },
/* 237 */ { IMChar, IMChar, InvalidKey, {EVENT_MISC, 0, 0, 0, 0, 0, 0}, {EVENT_INS, 1, 0, 0, 0, 0, 0} },
/* 238 */ { IMChar, IMChar, InvalidKey, {EVENT_MISC, 0, 0, 0, 0, 0, 0}, {EVENT_INS, 1, 0, 0, 0, 0, 0} },
/* 239 */ { IMChar, IMChar, InvalidKey, {EVENT_MISC, 0, 0, 0, 0, 0, 0}, {EVENT_INS, 1, 0, 0, 0, 0, 0} },
/* 240 */ { IMChar, IMChar, InvalidKey, {EVENT_MISC, 0, 0, 0, 0, 0, 0}, {EVENT_INS, 1, 0, 0, 0, 0, 0} },
/* 241 */ { IMChar, IMChar, InvalidKey, {EVENT_MISC, 0, 0, 0, 0, 0, 0}, {EVENT_INS, 1, 0, 0, 0, 0, 0} },
/* 242 */ { IMChar, IMChar, InvalidKey, {EVENT_MISC, 0, 0, 0, 0, 0, 0}, {EVENT_INS, 1, 0, 0, 0, 0, 0} },
/* 243 */ { IMChar, IMChar, InvalidKey, {EVENT_MISC, 0, 0, 0, 0, 0, 0}, {EVENT_INS, 1, 0, 0, 0, 0, 0} },
/* 244 */ { IMChar, IMChar, InvalidKey, {EVENT_MISC, 0, 0, 0, 0, 0, 0}, {EVENT_INS, 1, 0, 0, 0, 0, 0} },
/* 245 */ { IMChar, IMChar, InvalidKey, {EVENT_MISC, 0, 0, 0, 0, 0, 0}, {EVENT_INS, 1, 0, 0, 0, 0, 0} },
/* 246 */ { IMChar, IMChar, InvalidKey, {EVENT_MISC, 0, 0, 0, 0, 0, 0}, {EVENT_INS, 1, 0, 0, 0, 0, 0} },
/* 247 */ { IMChar, IMChar, InvalidKey, {EVENT_MISC, 0, 0, 0, 0, 0, 0}, {EVENT_INS, 1, 0, 0, 0, 0, 0} },
/* 248 */ { IMChar, IMChar, InvalidKey, {EVENT_MISC, 0, 0, 0, 0, 0, 0}, {EVENT_INS, 1, 0, 0, 0, 0, 0} },
/* 249 */ { IMChar, IMChar, InvalidKey, {EVENT_MISC, 0, 0, 0, 0, 0, 0}, {EVENT_INS, 1, 0, 0, 0, 0, 0} },
/* 250 */ { IMChar, IMChar, InvalidKey, {EVENT_MISC, 0, 0, 0, 0, 0, 0}, {EVENT_INS, 1, 0, 0, 0, 0, 0} },
/* 251 */ { IMChar, IMChar, InvalidKey, {EVENT_MISC, 0, 0, 0, 0, 0, 0}, {EVENT_INS, 1, 0, 0, 0, 0, 0} },
/* 252 */ { IMChar, IMChar, InvalidKey, {EVENT_MISC, 0, 0, 0, 0, 0, 0}, {EVENT_INS, 1, 0, 0, 0, 0, 0} },
/* 253 */ { IMChar, IMChar, InvalidKey, {EVENT_MISC, 0, 0, 0, 0, 0, 0}, {EVENT_INS, 1, 0, 0, 0, 0, 0} },
/* 254 */ { IMChar, IMChar, InvalidKey, {EVENT_MISC, 0, 0, 0, 0, 0, 0}, {EVENT_INS, 1, 0, 0, 0, 0, 0} },
/* 255 */ { IMChar, IMChar, InvalidKey, {EVENT_MISC, 0, 0, 0, 0, 0, 0}, {EVENT_INS, 1, 0, 0, 0, 0, 0} },
/* 256 */ { IMChar, IMChar, InvalidKey, {EVENT_MISC, 0, 0, 0, 0, 0, 0}, {EVENT_INS, 1, 0, 0, 0, 0, 0} },
#endif

#ifdef __WIN__
/* F1 */ { DoHelpOnContext, InvalidKey, DoHelpOnContext, {EVENT_MISC, 0, 0, 0, 0, 0, 0}, {EVENT_MISC, 0, 0, 0, 0, 0, 0} },
#else
/* F1 */ { DoHelpOnContext, InvalidKey, RotateFileForward, {EVENT_MISC, 0, 0, 0, 0, 0, 0}, {EVENT_MISC, 0, 0, 0, 0, 0, 0} },
#endif
/* F2 */ { RotateFileBackwards, InvalidKey, RotateFileBackwards, {EVENT_MISC, 0, 0, 0, 0, 0, 0}, {EVENT_MISC, 0, 0, 0, 0, 0, 0} },
/* F3 */ { DoNextFindForwardMisc, InvalidKey, InvalidKey, {EVENT_MISC, 0, 0, 0, 0, 0, 0}, {EVENT_MISC, 0, 0, 0, 0, 0, 0} },
/* F4 */ { InvalidKey, InvalidKey, InvalidKey, {EVENT_MISC, 0, 0, 0, 0, 0, 0}, {EVENT_MISC, 0, 0, 0, 0, 0, 0} },
/* F5 */ { FancyGotoLine, InvalidKey, FancyGotoLine, {EVENT_MISC, 0, 0, 0, 0, 0, 0}, {EVENT_MISC, 0, 0, 0, 0, 0, 0} },
/* F6 */ { RotateFileForward, InvalidKey, InvalidKey, {EVENT_MISC, 0, 0, 0, 0, 0, 0}, {EVENT_MISC, 0, 0, 0, 0, 0, 0} },
// start hotkeys - duplicate in ..\win\hotkysub.c
#ifdef __WIN__
/* F7 */ { ToggleColorbar, InvalidKey, ToggleColorbar, {EVENT_MISC, 0, 0, 0, 0, 0, 0}, {EVENT_MISC, 0, 0, 0, 0, 0, 0} },
/* F8 */ { ToggleFontbar, InvalidKey, ToggleFontbar, {EVENT_MISC, 0, 0, 0, 0, 0, 0}, {EVENT_MISC, 0, 0, 0, 0, 0, 0} },
/* F9 */ { ToggleSSbar, InvalidKey, ToggleSSbar, {EVENT_MISC, 0, 0, 0, 0, 0, 0}, {EVENT_MISC, 0, 0, 0, 0, 0, 0} },
#else
/* F7 */ { InvalidKey, InvalidKey, InvalidKey, {EVENT_MISC, 0, 0, 0, 0, 0, 0}, {EVENT_MISC, 0, 0, 0, 0, 0, 0} },
/* F8 */ { InvalidKey, InvalidKey, InvalidKey, {EVENT_MISC, 0, 0, 0, 0, 0, 0}, {EVENT_MISC, 0, 0, 0, 0, 0, 0} },
/* F9 */ { InvalidKey, InvalidKey, InvalidKey, {EVENT_MISC, 0, 0, 0, 0, 0, 0}, {EVENT_MISC, 0, 0, 0, 0, 0, 0} },
#endif
// end hotkeys
/* F10 */ { InvalidKey, InvalidKey, InvalidKey, {EVENT_MISC, 0, 0, 0, 0, 0, 0}, {EVENT_MISC, 0, 0, 0, 0, 0, 0} },
/* UP */ { MoveUp, IMCursorKey, MoveUp, {EVENT_REL_MOVE, 0, 0, 0, 0, 1, 0}, {EVENT_REL_MOVE, 0, 0, 0, 0, 0, 0} },
/* DOWN */ { MoveDown, IMCursorKey, MoveDown, {EVENT_REL_MOVE, 0, 0, 0, 0, 1, 0}, {EVENT_REL_MOVE, 0, 0, 0, 0, 0, 0} },
/* LEFT */ { MoveLeft, IMCursorKey, MoveLeft, {EVENT_REL_MOVE, 0, 0, 1, 0, 1, 0}, {EVENT_REL_MOVE, 0, 0, 1, 0, 0, 0} },
/* RIGHT */ { MoveRight, IMCursorKey, MoveRight, {EVENT_REL_MOVE, 0, 0, 1, 0, 1, 0}, {EVENT_REL_MOVE, 0, 0, 1, 0, 0, 0} },
/* PAGEUP */ { MovePageUp, IMCursorKey, MovePageUp, {EVENT_MISC, 0, 0, 0, 0, 1, 0}, {EVENT_MISC, 0, 0, 0, 0, 0, 0} },
/* PAGEDOWN */ { MovePageDown, IMCursorKey, MovePageDown, {EVENT_MISC, 0, 0, 0, 0, 1, 0}, {EVENT_MISC, 0, 0, 0, 0, 0, 0} },
/* INS */ { IMInsert, IMInsert, InsertTextAtCursor, {EVENT_MISC, 0, 0, 0, 0, 0, 0}, {EVENT_MISC, 1, 0, 0, 0, 0, 0} },
/* DEL */ { IMDeleteML, IMDelete, DoDeleteCharAtCursor, {EVENT_OP, 1, 0, 0, 1, 0, 1}, {EVENT_INS, 1, 0, 0, 0, 0, 0} },
/* BS */ { IMBackSpaceML, IMBackSpace, MoveLeft, {EVENT_REL_MOVE, 0, 0, 1, 0, 0, 0}, {EVENT_INS, 1, 0, 0, 0, 0, 0} },
/* SHIFT_TAB */ { IMTabs, IMTabs, MoveShiftTab, {EVENT_REL_MOVE, 0, 0, 0, 0, 0, 0}, {EVENT_INS, 1, 0, 0, 0, 0, 0} },
/* ENTER */ { IMEnter, IMEnter, MoveStartNextLine, {EVENT_REL_MOVE, 0, 0, 0, 0, 0, 0}, {EVENT_INS, 1, 0, 0, 0, 0, 0} },
/* TAB */ { IMTabs, IMTabs, MoveTab, {EVENT_REL_MOVE, 0, 0, 0, 0, 0, 0}, {EVENT_INS, 1, 0, 0, 0, 0, 0} },
/* HOME */ { MoveLineBegin, IMCursorKey, MoveLineBegin, {EVENT_REL_MOVE, 0, 0, 0, 0, 0, 0}, {EVENT_REL_MOVE, 0, 0, 0, 0, 0, 0} },
/* END */ { MoveLineEnd, IMCursorKey, MoveLineEnd, {EVENT_REL_MOVE, 0, 0, 0, 0, 0, 0}, {EVENT_REL_MOVE, 0, 0, 0, 0, 0, 0} },
/* ESC */ { InvalidKey, IMEsc, NullResponse, {EVENT_MISC, 0, 0, 0, 0, 0, 0}, {EVENT_MISC, 1, 0, 0, 0, 0, 0} },
/* SHIFT_F1 */ { InvalidKey, InvalidKey, InvalidKey, {EVENT_MISC, 0, 0, 0, 0, 0, 0}, {EVENT_MISC, 0, 0, 0, 0, 0, 0} },
#ifdef __WIN__
/* SHIFT_F2 */ { ToggleToolbar, InvalidKey, ToggleToolbar, {EVENT_MISC, 0, 0, 0, 0, 0, 0}, {EVENT_MISC, 0, 0, 0, 0, 0, 0} },
/* SHIFT_F3 */ { ToggleStatusbar, InvalidKey, ToggleStatusbar, {EVENT_MISC, 0, 0, 0, 0, 0, 0}, {EVENT_MISC, 0, 0, 0, 0, 0, 0} },
/* SHIFT_F4 */ { FancyDoReplace, InvalidKey, FancyDoReplace, {EVENT_MISC, 0, 0, 0, 0, 0, 0}, {EVENT_MISC, 0, 0, 0, 0, 0, 0} },
/* SHIFT_F5 */ { DoNextFindForwardMisc, InvalidKey, DoNextFindForwardMisc, {EVENT_MISC, 0, 0, 0, 0, 0, 0}, {EVENT_MISC, 0, 0, 0, 0, 0, 0} },
/* SHIFT_F6 */ { RotateFileBackwards, InvalidKey, InvalidKey, {EVENT_MISC, 0, 0, 0, 0, 0, 0}, {EVENT_MISC, 0, 0, 0, 0, 0, 0} },
/* SHIFT_F7 */ { DoNextFindBackwardsMisc, InvalidKey, DoNextFindBackwardsMisc, {EVENT_MISC, 0, 0, 0, 0, 0, 0}, {EVENT_MISC, 0, 0, 0, 0, 0, 0} },
#else
/* SHIFT_F2 */ { InvalidKey, InvalidKey, InvalidKey, {EVENT_MISC, 0, 0, 0, 0, 0, 0}, {EVENT_MISC, 0, 0, 0, 0, 0, 0} },
/* SHIFT_F3 */ { InvalidKey, InvalidKey, InvalidKey, {EVENT_MISC, 0, 0, 0, 0, 0, 0}, {EVENT_MISC, 0, 0, 0, 0, 0, 0} },
/* SHIFT_F4 */ { InvalidKey, InvalidKey, InvalidKey, {EVENT_MISC, 0, 0, 0, 0, 0, 0}, {EVENT_MISC, 0, 0, 0, 0, 0, 0} },
/* SHIFT_F5 */ { InvalidKey, InvalidKey, InvalidKey, {EVENT_MISC, 0, 0, 0, 0, 0, 0}, {EVENT_MISC, 0, 0, 0, 0, 0, 0} },
/* SHIFT_F6 */ { RotateFileBackwards, InvalidKey, InvalidKey, {EVENT_MISC, 0, 0, 0, 0, 0, 0}, {EVENT_MISC, 0, 0, 0, 0, 0, 0} },
/* SHIFT_F7 */ { InvalidKey, InvalidKey, InvalidKey, {EVENT_MISC, 0, 0, 0, 0, 0, 0}, {EVENT_MISC, 0, 0, 0, 0, 0, 0} },
#endif
/* SHIFT_F8 */ { InvalidKey, InvalidKey, InvalidKey, {EVENT_MISC, 0, 0, 0, 0, 0, 0}, {EVENT_MISC, 0, 0, 0, 0, 0, 0} },
/* SHIFT_F9 */ { InvalidKey, InvalidKey, InvalidKey, {EVENT_MISC, 0, 0, 0, 0, 0, 0}, {EVENT_MISC, 0, 0, 0, 0, 0, 0} },
/* SHIFT_F10 */ { InvalidKey, InvalidKey, InvalidKey, {EVENT_MISC, 0, 0, 0, 0, 0, 0}, {EVENT_MISC, 0, 0, 0, 0, 0, 0} },
/* ALT_F1 */ { InvalidKey, InvalidKey, Change, {EVENT_OP, 1, 0, 0, 0, 0, 1}, {EVENT_MISC, 0, 0, 0, 0, 0, 0} },
/* ALT_F2 */ { InvalidKey, InvalidKey, Delete, {EVENT_OP, 1, 0, 0, 0, 0, 1}, {EVENT_MISC, 0, 0, 0, 0, 0, 0} },
#ifdef __WIN__
/* CS_LEFT */ { SelectBackwardsWord, InvalidKey, SelectBackwardsWord, {EVENT_REL_MOVE, 1, 0, 0, 0, 0, 0}, {EVENT_REL_MOVE, 1, 0, 0, 0, 0, 0} },
/* CS_RIGHT */ { SelectForwardWord, InvalidKey, SelectForwardWord, {EVENT_REL_MOVE, 1, 0, 0, 0, 0, 0}, {EVENT_REL_MOVE, 1, 0, 0, 0, 0, 0} },
/* CS_UP */ { InvalidKey, InvalidKey, InvalidKey, {EVENT_MISC, 0, 0, 0, 0, 0, 0}, {EVENT_MISC, 0, 0, 0, 0, 0, 0} },
/* CS_DOWN */ { InvalidKey, InvalidKey, InvalidKey, {EVENT_MISC, 0, 0, 0, 0, 0, 0}, {EVENT_MISC, 0, 0, 0, 0, 0, 0} },
/* CS_PAGEUP */ { SelectTopOfPage, InvalidKey, SelectTopOfPage, {EVENT_ABS_MOVE, 1, 0, 0, 0, 0, 0}, {EVENT_ABS_MOVE, 1, 0, 0, 0, 0, 0} },
/* CS_PAGEDOWN */ { SelectBottomOfPage, InvalidKey, SelectBottomOfPage, {EVENT_ABS_MOVE, 1, 0, 0, 0, 0, 0}, {EVENT_ABS_MOVE, 1, 0, 0, 0, 0, 0} },
/* CS_HOME */ { SelectStartOfFile, InvalidKey, SelectStartOfFile, {EVENT_ABS_MOVE, 1, 0, 0, 0, 0, 0}, {EVENT_ABS_MOVE, 1, 0, 0, 0, 0, 0} },
/* CS_END */ { SelectEndOfFile, InvalidKey, SelectEndOfFile, {EVENT_ABS_MOVE, 1, 0, 0, 0, 0, 0}, {EVENT_ABS_MOVE, 1, 0, 0, 0, 0, 0} },
#else
/* ALT_F3 */ { InvalidKey, InvalidKey, Yank, {EVENT_OP, 1, 0, 0, 0, 0, 0}, {EVENT_MISC, 0, 0, 0, 0, 0, 0} },
/* ALT_F4 */ { InvalidKey, InvalidKey, ChangeCase, {EVENT_OP, 1, 0, 0, 0, 0, 1}, {EVENT_MISC, 0, 0, 0, 0, 0, 0} },
/* ALT_F5 */ { InvalidKey, InvalidKey, Filter, {EVENT_OP, 1, 0, 0, 0, 0, 1}, {EVENT_MISC, 0, 0, 0, 0, 0, 0} },
/* ALT_F6 */ { InvalidKey, InvalidKey, StartSuck, {EVENT_OP, 1, 0, 0, 0, 0, 1}, {EVENT_MISC, 0, 0, 0, 0, 0, 0} },
/* ALT_F7 */ { InvalidKey, InvalidKey, StartShove, {EVENT_OP, 1, 0, 0, 0, 0, 1}, {EVENT_MISC, 0, 0, 0, 0, 0, 0} },
/* ALT_F8 */ { InvalidKey, InvalidKey, InvalidKey, {EVENT_MISC, 0, 0, 0, 0, 0, 0}, {EVENT_MISC, 0, 0, 0, 0, 0, 0} },
/* ALT_F9 */ { InvalidKey, InvalidKey, InvalidKey, {EVENT_MISC, 0, 0, 0, 0, 0, 0}, {EVENT_MISC, 0, 0, 0, 0, 0, 0} },
/* ALT_F10 */ { InvalidKey, InvalidKey, InvalidKey, {EVENT_MISC, 0, 0, 0, 0, 0, 0}, {EVENT_MISC, 0, 0, 0, 0, 0, 0} },
#endif
/* CTRL_F1 */ { InvalidKey, InvalidKey, SwitchSavebuf, {EVENT_MISC, 0, 0, 0, 0, 0, 0}, {EVENT_MISC, 0, 0, 0, 0, 0, 0} },
#ifdef __WIN__
/* CTRL_F2 */ { DoFindForward, InvalidKey, DoFindForward, {EVENT_ABS_MOVE, 1, 0, 0, 0, 0, 0}, {EVENT_ABS_MOVE, 1, 0, 0, 0, 0, 0} },
#else
/* CTRL_F2 */ { DoFindForward, InvalidKey, SwitchSavebuf, {EVENT_MISC, 0, 0, 0, 0, 0, 0}, {EVENT_ABS_MOVE, 1, 0, 0, 0, 0, 0} },
#endif
/* CTRL_F3 */ { InvalidKey, InvalidKey, SwitchSavebuf, {EVENT_MISC, 0, 0, 0, 0, 0, 0}, {EVENT_MISC, 0, 0, 0, 0, 0, 0} },
/* CTRL_F4 */ { CurFileExitOptionSaveChanges, InvalidKey, SwitchSavebuf, {EVENT_MISC, 0, 0, 0, 0, 0, 0}, {EVENT_MISC, 0, 0, 0, 0, 0, 0} },
/* CTRL_F5 */ { InvalidKey, InvalidKey, SwitchSavebuf, {EVENT_MISC, 0, 0, 0, 0, 0, 0}, {EVENT_MISC, 0, 0, 0, 0, 0, 0} },
/* CTRL_F6 */ { RotateFileForward, InvalidKey, SwitchSavebuf, {EVENT_MISC, 0, 0, 0, 0, 0, 0}, {EVENT_MISC, 0, 0, 0, 0, 0, 0} },
/* CTRL_F7 */ { InvalidKey, InvalidKey, SwitchSavebuf, {EVENT_MISC, 0, 0, 0, 0, 0, 0}, {EVENT_MISC, 0, 0, 0, 0, 0, 0} },
#ifdef __WIN__
/* CTRL_F8 */ { FancySetGen, InvalidKey, FancySetGen, {EVENT_MISC, 0, 0, 0, 0, 0, 0}, {EVENT_MISC, 0, 0, 0, 0, 0, 0} },
/* CTRL_F9 */ { FancySetScr, InvalidKey, FancySetScr, {EVENT_MISC, 0, 0, 0, 0, 0, 0}, {EVENT_MISC, 0, 0, 0, 0, 0, 0} },
/* CTRL_F10 */ { FancySetFS, InvalidKey, FancySetFS, {EVENT_MISC, 0, 0, 0, 0, 0, 0}, {EVENT_MISC, 0, 0, 0, 0, 0, 0} },
#else
/* CTRL_F8 */ { FancySetGen, InvalidKey, SwitchSavebuf, {EVENT_MISC, 0, 0, 0, 0, 0, 0}, {EVENT_MISC, 0, 0, 0, 0, 0, 0} },
/* CTRL_F9 */ { FancySetScr, InvalidKey, SwitchSavebuf, {EVENT_MISC, 0, 0, 0, 0, 0, 0}, {EVENT_MISC, 0, 0, 0, 0, 0, 0} },
/* CTRL_F10 */ { FancySetFS, InvalidKey, SwitchSavebuf, {EVENT_MISC, 0, 0, 0, 0, 0, 0}, {EVENT_MISC, 0, 0, 0, 0, 0, 0} },
#endif
/* ALT_A */ { InvalidKey, IMMenuKey, HeapCheck, {EVENT_MISC, 0, 0, 0, 0, 0, 0}, {EVENT_MISC, 0, 0, 0, 0, 0, 0} },
/* ALT_B */ { InvalidKey, IMMenuKey, InvalidKey, {EVENT_MISC, 0, 0, 0, 0, 0, 0}, {EVENT_MISC, 0, 0, 0, 0, 0, 0} },
/* ALT_C */ { InvalidKey, IMMenuKey, InvalidKey, {EVENT_MISC, 0, 0, 0, 0, 0, 0}, {EVENT_MISC, 0, 0, 0, 0, 0, 0} },
/* ALT_D */ { InvalidKey, IMMenuKey, FcbThreadDump, {EVENT_MISC, 0, 0, 0, 0, 0, 0}, {EVENT_MISC, 0, 0, 0, 0, 0, 0} },
/* ALT_E */ { InvalidKey, IMMenuKey, FcbDump, {EVENT_MISC, 0, 0, 0, 0, 0, 0}, {EVENT_MISC, 0, 0, 0, 0, 0, 0} },
/* ALT_F */ { InvalidKey, IMMenuKey, InvalidKey, {EVENT_MISC, 0, 0, 0, 0, 0, 0}, {EVENT_MISC, 0, 0, 0, 0, 0, 0} },
/* ALT_G */ { DoWindowGadgetMenu, IMMenuKey, DoWindowGadgetMenu, {EVENT_MISC, 0, 0, 0, 0, 0, 0}, {EVENT_MISC, 0, 0, 0, 0, 0, 0} },
/* ALT_H */ { InvalidKey, IMMenuKey, InvalidKey, {EVENT_MISC, 0, 0, 0, 0, 0, 0}, {EVENT_MISC, 0, 0, 0, 0, 0, 0} },
/* ALT_I */ { InvalidKey, IMMenuKey, InvalidKey, {EVENT_MISC, 0, 0, 0, 0, 0, 0}, {EVENT_MISC, 0, 0, 0, 0, 0, 0} },
/* ALT_J */ { InvalidKey, IMMenuKey, InvalidKey, {EVENT_MISC, 0, 0, 0, 0, 0, 0}, {EVENT_MISC, 0, 0, 0, 0, 0, 0} },
/* ALT_K */ { InvalidKey, IMMenuKey, InvalidKey, {EVENT_MISC, 0, 0, 0, 0, 0, 0}, {EVENT_MISC, 0, 0, 0, 0, 0, 0} },
/* ALT_L */ { InvalidKey, IMMenuKey, InvalidKey, {EVENT_MISC, 0, 0, 0, 0, 0, 0}, {EVENT_MISC, 0, 0, 0, 0, 0, 0} },
/* ALT_M */ { InvalidKey, IMMenuKey, DumpMemory, {EVENT_MISC, 0, 0, 0, 0, 0, 0}, {EVENT_MISC, 0, 0, 0, 0, 0, 0} },
/* ALT_N */ { InvalidKey, IMMenuKey, InvalidKey, {EVENT_MISC, 0, 0, 0, 0, 0, 0}, {EVENT_MISC, 0, 0, 0, 0, 0, 0} },
/* ALT_O */ { InvalidKey, IMMenuKey, InvalidKey, {EVENT_MISC, 0, 0, 0, 0, 0, 0}, {EVENT_MISC, 0, 0, 0, 0, 0, 0} },
/* ALT_P */ { InvalidKey, IMMenuKey, InvalidKey, {EVENT_MISC, 0, 0, 0, 0, 0, 0}, {EVENT_MISC, 0, 0, 0, 0, 0, 0} },
/* ALT_Q */ { InvalidKey, IMMenuKey, InvalidKey, {EVENT_MISC, 0, 0, 0, 0, 0, 0}, {EVENT_MISC, 0, 0, 0, 0, 0, 0} },
/* ALT_R */ { InvalidKey, IMMenuKey, InvalidKey, {EVENT_MISC, 0, 0, 0, 0, 0, 0}, {EVENT_MISC, 0, 0, 0, 0, 0, 0} },
/* ALT_S */ { InvalidKey, IMMenuKey, SanityCheck, {EVENT_MISC, 0, 0, 0, 0, 0, 0}, {EVENT_MISC, 0, 0, 0, 0, 0, 0} },
/* ALT_T */ { InvalidKey, IMMenuKey, InvalidKey, {EVENT_MISC, 0, 0, 0, 0, 0, 0}, {EVENT_MISC, 0, 0, 0, 0, 0, 0} },
/* ALT_U */ { InvalidKey, IMMenuKey, WalkUndo, {EVENT_MISC, 0, 0, 0, 0, 0, 0}, {EVENT_MISC, 0, 0, 0, 0, 0, 0} },
/* ALT_V */ { InvalidKey, IMMenuKey, InvalidKey, {EVENT_MISC, 0, 0, 0, 0, 0, 0}, {EVENT_MISC, 0, 0, 0, 0, 0, 0} },
/* ALT_W */ { InvalidKey, IMMenuKey, InvalidKey, {EVENT_MISC, 0, 0, 0, 0, 0, 0}, {EVENT_MISC, 0, 0, 0, 0, 0, 0} },
/* ALT_X */ { InvalidKey, IMMenuKey, EnterHexKey, {EVENT_MISC, 0, 0, 0, 0, 0, 0}, {EVENT_MISC, 0, 0, 0, 0, 0, 0} },
/* ALT_Y */ { InvalidKey, IMMenuKey, InvalidKey, {EVENT_MISC, 0, 0, 0, 0, 0, 0}, {EVENT_MISC, 0, 0, 0, 0, 0, 0} },
/* ALT_Z */ { InvalidKey, IMMenuKey, InvalidKey, {EVENT_MISC, 0, 0, 0, 0, 0, 0}, {EVENT_MISC, 0, 0, 0, 0, 0, 0} },
/* F11 */ { InvalidKey, InvalidKey, PushFileStackAndMsg, {EVENT_MISC, 0, 0, 0, 0, 0, 0}, {EVENT_MISC, 0, 0, 0, 0, 0, 0} },
/* F12 */ { InvalidKey, InvalidKey, PopFileStack, {EVENT_MISC, 0, 0, 0, 0, 0, 0}, {EVENT_MISC, 0, 0, 0, 0, 0, 0} },
/* SHIFT_F11 */ { InvalidKey, InvalidKey, SwitchSavebuf, {EVENT_MISC, 0, 0, 0, 0, 0, 0}, {EVENT_MISC, 0, 0, 0, 0, 0, 0} },
/* SHIFT_F12 */ { InvalidKey, InvalidKey, SwitchSavebuf, {EVENT_MISC, 0, 0, 0, 0, 0, 0}, {EVENT_MISC, 0, 0, 0, 0, 0, 0} },
/* CTRL_F11 */ { InvalidKey, InvalidKey, InvalidKey, {EVENT_MISC, 0, 0, 0, 0, 0, 0}, {EVENT_MISC, 0, 0, 0, 0, 0, 0} },
/* CTRL_F12 */ { InvalidKey, InvalidKey, InvalidKey, {EVENT_MISC, 0, 0, 0, 0, 0, 0}, {EVENT_MISC, 0, 0, 0, 0, 0, 0} },
/* ALT_F11 */ { InvalidKey, InvalidKey, InvalidKey, {EVENT_MISC, 0, 0, 0, 0, 0, 0}, {EVENT_MISC, 0, 0, 0, 0, 0, 0} },
/* ALT_F12 */ { InvalidKey, InvalidKey, InvalidKey, {EVENT_MISC, 0, 0, 0, 0, 0, 0}, {EVENT_MISC, 0, 0, 0, 0, 0, 0} },
/* CTRL_END */ { MoveEndOfFile, InvalidKey, MoveEndOfFile, {EVENT_ABS_MOVE, 0, 0, 0, 0, 0, 0}, {EVENT_ABS_MOVE, 0, 0, 0, 0, 0, 0} },
/* CTRL_DEL */ { DeleteLines, IMCursorKey, DeleteLines, {EVENT_MISC, 0, 0, 0, 0, 0, 0}, {EVENT_MISC, 0, 0, 0, 0, 0, 0} },
/* CTRL_INS */ { AddSelRgnToSavebuf, IMCursorKey, AddSelRgnToSavebuf, {EVENT_MISC, 1, 0, 0, 0, 0, 0}, {EVENT_MISC, 1, 0, 0, 0, 0, 0} },
/* CTRL_HOME */ { MoveStartOfFile, InvalidKey, MoveStartOfFile, {EVENT_ABS_MOVE, 0, 0, 0, 0, 0, 0}, {EVENT_ABS_MOVE, 0, 0, 0, 0, 0, 0} },
/* CTRL_PAGEUP */ { MoveTopOfPage, IMCursorKey, MoveTopOfPage, {EVENT_ABS_MOVE, 0, 0, 0, 0, 0, 0}, {EVENT_ABS_MOVE, 0, 0, 0, 0, 0, 0} },
/* CTRL_PAGEDOWN */ { MoveBottomOfPage, IMCursorKey, MoveBottomOfPage, {EVENT_ABS_MOVE, 0, 0, 0, 0, 0, 0}, {EVENT_ABS_MOVE, 0, 0, 0, 0, 0, 0} },
/* CTRL_LEFT */ { MoveBackwardsWord, InvalidKey, MoveBackwardsWord, {EVENT_REL_MOVE, 0, 0, 1, 0, 0, 0}, {EVENT_REL_MOVE, 0, 0, 1, 0, 0, 0} },
/* CTRL_RIGHT */ { MoveForwardWord, InvalidKey, MoveForwardWord, {EVENT_REL_MOVE, 0, 0, 1, 0, 0, 0}, {EVENT_REL_MOVE, 0, 0, 1, 0, 0, 0} },
/* CTRL_UP */ { InvalidKey, InvalidKey, InvalidKey, {EVENT_MISC, 0, 0, 0, 0, 0, 0}, {EVENT_MISC, 0, 0, 0, 0, 0, 0} },
/* CTRL_DOWN */ { InvalidKey, InvalidKey, InvalidKey, {EVENT_MISC, 0, 0, 0, 0, 0, 0}, {EVENT_MISC, 0, 0, 0, 0, 0, 0} },
/* ALT_END */ { InvalidKey, InvalidKey, InvalidKey, {EVENT_MISC, 0, 0, 0, 0, 0, 0}, {EVENT_MISC, 0, 0, 0, 0, 0, 0} },
/* ALT_DEL */ { InvalidKey, InvalidKey, InvalidKey, {EVENT_MISC, 0, 0, 0, 0, 0, 0}, {EVENT_MISC, 0, 0, 0, 0, 0, 0} },
/* ALT_INS */ { DoUndoUndo, IMChar, DoUndoUndo, {EVENT_MISC, 0, 0, 0, 0, 0, 0}, {EVENT_MISC, 0, 0, 0, 0, 0, 0} },
/* ALT_HOME */ { InvalidKey, InvalidKey, InvalidKey, {EVENT_MISC, 0, 0, 0, 0, 0, 0}, {EVENT_MISC, 0, 0, 0, 0, 0, 0} },
/* ALT_PAGEUP */ { InvalidKey, InvalidKey, InvalidKey, {EVENT_MISC, 0, 0, 0, 0, 0, 0}, {EVENT_MISC, 0, 0, 0, 0, 0, 0} },
/* ALT_PAGEDOWN */ { InvalidKey, InvalidKey, InvalidKey, {EVENT_MISC, 0, 0, 0, 0, 0, 0}, {EVENT_MISC, 0, 0, 0, 0, 0, 0} },
/* ALT_LEFT */ { InvalidKey, InvalidKey, InvalidKey, {EVENT_MISC, 0, 0, 0, 0, 0, 0}, {EVENT_MISC, 0, 0, 0, 0, 0, 0} },
/* ALT_RIGHT */ { InvalidKey, InvalidKey, InvalidKey, {EVENT_MISC, 0, 0, 0, 0, 0, 0}, {EVENT_MISC, 0, 0, 0, 0, 0, 0} },
/* ALT_UP */ { InvalidKey, InvalidKey, InvalidKey, {EVENT_MISC, 0, 0, 0, 0, 0, 0}, {EVENT_MISC, 0, 0, 0, 0, 0, 0} },
/* ALT_DOWN */ { InvalidKey, InvalidKey, InvalidKey, {EVENT_MISC, 0, 0, 0, 0, 0, 0}, {EVENT_MISC, 0, 0, 0, 0, 0, 0} },
/* CTRL_TAB */ { InvalidKey, InvalidKey, RotateFileForward, {EVENT_MISC, 0, 0, 0, 0, 0, 0}, {EVENT_MISC, 0, 0, 0, 0, 0, 0} },
/* ALT_TAB */ { InvalidKey, InvalidKey, InvalidKey, {EVENT_MISC, 0, 0, 0, 0, 0, 0}, {EVENT_MISC, 0, 0, 0, 0, 0, 0} },
/* MOUSEEVENT */ { HandleMouseEvent, IMMouseEvent, HandleMouseEvent, {EVENT_MISC, 1, 0, 0, 0, 0, 0}, {EVENT_MISC, 1, 0, 0, 0, 0, 0} },
/* SHIFT_UP */ { SelectUp, IMCursorKey, SelectUp, {EVENT_MISC, 1, 0, 0, 0, 0, 0}, {EVENT_MISC, 1, 0, 0, 0, 0, 0} },
/* SHIFT_DOWN */ { SelectDown, IMCursorKey, SelectDown, {EVENT_MISC, 1, 0, 0, 0, 0, 0}, {EVENT_MISC, 1, 0, 0, 0, 0, 0} },
/* SHIFT_LEFT */ { SelectLeft, IMCursorKey, SelectLeft, {EVENT_REL_MOVE, 1, 0, 0, 0, 0, 0}, {EVENT_REL_MOVE, 1, 0, 0, 0, 0, 0} },
/* SHIFT_RIGHT */ { SelectRight, IMCursorKey, SelectRight, {EVENT_REL_MOVE, 1, 0, 0, 0, 0, 0}, {EVENT_REL_MOVE, 1, 0, 0, 0, 0, 0} },
/* SHIFT_DEL */ { DoDeleteRegion, InvalidKey, DoDeleteRegion, {EVENT_OP, 1, 0, 0, 1, 0, 1}, {EVENT_OP, 1, 0, 0, 1, 0, 1} },
/* SHIFT_INS */ { InsertSavebufBefore2, InvalidKey, InsertSavebufBefore2, {EVENT_MISC, 0, 0, 0, 0, 0, 0}, {EVENT_MISC, 1, 0, 0, 0, 0, 0} },
/* SHIFT_HOME */ { SelectHome, InvalidKey, InvalidKey, {EVENT_MISC, 0, 0, 0, 0, 0, 0}, {EVENT_MISC, 1, 0, 0, 0, 0, 0} },
/* SHIFT_END */ { SelectEnd, InvalidKey, InvalidKey, {EVENT_MISC, 0, 0, 0, 0, 0, 0}, {EVENT_MISC, 1, 0, 0, 0, 0, 0} },
/* SHIFT_PAGEUP */ { SelectPageUp, InvalidKey, SelectPageUp, {EVENT_MISC, 1, 0, 0, 0, 0, 0}, {EVENT_MISC, 1, 0, 0, 0, 0, 0} },
/* SHIFT_PAGEDOWN */ { SelectPageDown, InvalidKey, SelectPageDown, {EVENT_MISC, 1, 0, 0, 0, 0, 0}, {EVENT_MISC, 1, 0, 0, 0, 0, 0} },
/* FAKEMOUSE */ { InvalidKey, InvalidKey, AbsoluteNullResponse, {EVENT_MISC, 1, 0, 0, 0, 0, 0}, {EVENT_MISC, 1, 0, 0, 0, 0, 0} },
/* IDLE */ { InvalidKey, AbsoluteNullResponse, AbsoluteNullResponse, {EVENT_MISC, 1, 0, 0, 0, 0, 0}, {EVENT_MISC, 1, 0, 0, 0, 0, 0} },
/* ALT_BS */ { DoUndo, IMChar, DoUndo, {EVENT_MISC, 0, 0, 0, 0, 0, 0}, {EVENT_MISC, 0, 0, 0, 0, 0, 0} },
/* CTRL_BS */ { InvalidKey, InvalidKey, InvalidKey, {EVENT_MISC, 0, 0, 0, 0, 0, 0}, {EVENT_MISC, 0, 0, 0, 0, 0, 0} },
//* ALT_HYPHEN  { DoWindowGadgetMenu, IMMenuKey, InvalidKey, {EVENT_MISC, 0, 0, 0, 0, 0, 0}, {EVENT_MISC, 0, 0, 0, 0, 0, 0} },
/* ALT_HYPHEN */ { DoWindowGadgetMenu, IMMenuKey, DoWindowGadgetMenu, {EVENT_MISC, 0, 0, 0, 0, 0, 0}, {EVENT_MISC, 0, 0, 0, 0, 0, 0} },
};

int EventCount = sizeof( EventList ) / sizeof( event );
