protected OnKeyPress ( |
||
e | ||
return | void |
protected override void OnKeyPress(KeyPressEventArgs e)
{
base.OnKeyPress(e);
if (!e.Handled && !_KeyDownHandled && e.KeyChar != (char) 127)
{
if ((e.KeyChar) < 32)
return;
if (!ReadOnly)
{
switch ((Keys) (int) e.KeyChar)
{
default:
{
InsertText(e.KeyChar.ToString
(CultureInfo.InvariantCulture)
);
if (Indent == IndentStyle.Scope || Indent ==
IndentStyle.Smart)
{
if (Caret.CurrentRow.ShouldOutdent)
{
OutdentEndRow();
}
}
break;
}
}
}
}
if (AutoListVisible && !e.Handled && _SyntaxBox.AutoListAutoSelect)
{
string s = Caret.CurrentRow.Text;
try
{
if (Caret.Position.X - AutoListStartPos.X >= 0)
{
s = s.Substring(AutoListStartPos.X, Caret.Position.X -
AutoListStartPos.X);
AutoList.SelectItem(s);
}
}
catch {}
}
}