Per's picture

Using Arrow keys in GLControl

I 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

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
the Fiddler.'s picture

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?

Per's picture

Thanks ! that works great

/Per