Added logic to properly do the Ctrl Del keystroke

This commit is contained in:
John Jenko 2017-01-26 14:56:57 +00:00
parent 0659754ccf
commit 9d6bfa6bf9

View File

@ -2317,9 +2317,18 @@ namespace Volian.Controls.Library
} }
if (SelectionStart != TextLength) if (SelectionStart != TextLength)
{ {
SelectionStart++;// A Delete can be accomplished with a right arrow followed by a backspace. if (e.Control)
RtbSendKeys("{BS}"); // This is done due to a glitch in the RichTextBox that sometimes causes a beep rather than a delete {
e.SuppressKeyPress = true; // B2016-245 [ctrl][delete] deletes rest of word to the right of the cursor
RtbSendKeys("+^{RIGHT}{BS}"); //[shift][ctrl][right arrow] (selects rest of word to the right) folowed by a backspace (delete)
e.SuppressKeyPress = true;
}
else
{
SelectionStart++;// A Delete can be accomplished with a right arrow followed by a backspace.
RtbSendKeys("{BS}"); // This is done due to a glitch in the RichTextBox that sometimes causes a beep rather than a delete
e.SuppressKeyPress = true;
}
} }
} }
else else