Kevitus's picture

OpenTK.Input.Key to System.Windows.Forms.Keys conversion?

Hi all!
I've been trying to find a way to convert openTK.Input.Key's to the normal Keys. Right now I'm using a switch case construct to distinguish between every single key in a key_down event.
I was wondering if there was a better solution than this.


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'm afraid I cannot think of any way around that. WinForms, WPF, GTK#, XNA, OpenTK all use different enumerations for keys so there's no way around manual conversions.

However, it would make sense to add a conversion function from/to WinForms in OpenTK.GLControl.dll (please file a feature request if that sounds useful!)