
Using Arrow keys in GLControl
Posted Monday, 15 October, 2007 - 08:11 by Per inI would like to use the arrow keys as input keys in the GLControl
This is possible if the following function is added to GLControl :
protected override bool IsInputKey(Keys keyData)
{
switch (keyData)
{
case Keys.Up:
case Keys.Down:
case Keys.Right:
case Keys.Left:
return true;
}
return base.IsInputKey(keyData);
}
/Per


Comments
I'd prefer to keep the
I'd prefer to keep the default behavior wherever possible (principle of least surprise). Is there any reason why you cannot inherit GLControl and override IsInputKeys?
Thanks ! that works
Thanks ! that works great
/Per