internal EditCommand ConvertTypeChar(char data) { using (var ptr = CharPointer.Create(data)) { Assert.True(OleCommandUtil.TryConvert(VSConstants.VSStd2K, (uint)VSConstants.VSStd2KCmdID.TYPECHAR, ptr.IntPtr, VimKeyModifiers.None, out EditCommand command)); return(command); } }
public void TypeChar_WithModifiers() { var source = @"@£$€{[]}\"; var modifiers = VimKeyModifiers.Alt | VimKeyModifiers.Control; foreach (var c in source) { using (var ptr = CharPointer.Create(c)) { Assert.True(OleCommandUtil.TryConvert(VSConstants.VSStd2K, (uint)VSConstants.VSStd2KCmdID.TYPECHAR, ptr.IntPtr, modifiers, out EditCommand command)); Assert.Equal(c, command.KeyInput.Char); } } }