in sqlnexus/fmParameters.cs [1192:1249]
public bool EditingControlWantsInputKey(Keys keyData, bool dataGridViewWantsInputKey)
{
switch (keyData & Keys.KeyCode)
{
case Keys.Right:
//
// If the end of the selection is at the end of the string
// let the DataGridView treat the key message
//
if (!(this.SelectionLength == 0
&& this.SelectionStart == this.ToString().Length))
{
return true;
}
break;
case Keys.Left:
//
// If the end of the selection is at the begining of the
// string or if the entire text is selected send this character
// to the dataGridView; else process the key event.
//
if (!(this.SelectionLength == 0
&& this.SelectionStart == 0))
{
return true;
}
break;
case Keys.Home:
case Keys.End:
if (this.SelectionLength != this.ToString().Length)
{
return true;
}
break;
case Keys.Prior:
case Keys.Next:
if (this.valueChanged)
{
return true;
}
break;
case Keys.Delete:
if (this.SelectionLength > 0 || this.SelectionStart < this.ToString().Length)
{
return true;
}
break;
}
//
// defer to the DataGridView and see if it wants it.
//
return !dataGridViewWantsInputKey;
}