public VimKeyEventArgs(VimKeyInput keyInput) { this.KeyInput = keyInput; }
bool TryConvert(VSConstants.VSStd97CmdID cmdId, IntPtr pVariantIn, out VimKeyInput ki) { ki = null; switch (cmdId) { case VSConstants.VSStd97CmdID.SingleChar: break; case VSConstants.VSStd97CmdID.Escape: ki = new VimKeyInput(VimKeyInput.Escape); break; case VSConstants.VSStd97CmdID.Delete: ki = new VimKeyInput(VimKeyInput.Delete); break; case VSConstants.VSStd97CmdID.F1Help: break; } return ki != null; }
bool TryConvert(VSConstants.VSStd2KCmdID cmdId, IntPtr pVariantIn, out VimKeyInput ki) { ki = null; switch (cmdId) { case VSConstants.VSStd2KCmdID.TYPECHAR: break; case VSConstants.VSStd2KCmdID.RETURN: ki = new VimKeyInput(VimKeyInput.Enter); break; case VSConstants.VSStd2KCmdID.CANCEL: ki = new VimKeyInput(VimKeyInput.Escape); break; case VSConstants.VSStd2KCmdID.DELETE: ki = new VimKeyInput(VimKeyInput.Delete); break; case VSConstants.VSStd2KCmdID.BACKSPACE: ki = new VimKeyInput(VimKeyInput.Backspace); break; case VSConstants.VSStd2KCmdID.LEFT: case VSConstants.VSStd2KCmdID.LEFT_EXT: case VSConstants.VSStd2KCmdID.LEFT_EXT_COL: ki = new VimKeyInput(VimKeyInput.Arrow_Left); break; case VSConstants.VSStd2KCmdID.RIGHT: case VSConstants.VSStd2KCmdID.RIGHT_EXT: case VSConstants.VSStd2KCmdID.RIGHT_EXT_COL: ki = new VimKeyInput(VimKeyInput.Arrow_Right); break; case VSConstants.VSStd2KCmdID.UP: case VSConstants.VSStd2KCmdID.UP_EXT: case VSConstants.VSStd2KCmdID.UP_EXT_COL: ki = new VimKeyInput(VimKeyInput.Arrow_Up); break; case VSConstants.VSStd2KCmdID.DOWN: case VSConstants.VSStd2KCmdID.DOWN_EXT: case VSConstants.VSStd2KCmdID.DOWN_EXT_COL: ki = new VimKeyInput(VimKeyInput.Arrow_Down); break; case VSConstants.VSStd2KCmdID.TAB: ki = new VimKeyInput(VimKeyInput.Tab); break; case VSConstants.VSStd2KCmdID.PAGEDN: case VSConstants.VSStd2KCmdID.PAGEDN_EXT: ki = new VimKeyInput(VimKeyInput.Page_Down); break; case VSConstants.VSStd2KCmdID.PAGEUP: case VSConstants.VSStd2KCmdID.PAGEUP_EXT: ki = new VimKeyInput(VimKeyInput.Page_Up); break; default: break; } return ki != null; }
bool TryConvert(Guid commandGroup, uint commandId, IntPtr pVariableIn, out VimKeyInput ki) { if (VSConstants.GUID_VSStandardCommandSet97 == commandGroup) { return TryConvert((VSConstants.VSStd97CmdID)commandId, pVariableIn, out ki); } else if (VSConstants.VSStd2K == commandGroup) { return TryConvert((VSConstants.VSStd2KCmdID)commandId, pVariableIn, out ki); } else { ki = null; return false; } }