th's picture

Keyboard.GetState() problem

Hi

What the problem, when i want, get state of keyboard: KeyboardState state = OpenTK.Input.Keyboard.GetState();

Detail..
TypeInitializationExceptions

"The type initializer for 'OpenTK.Input.Keyboard' threw an exception."

"The method or operation is not implemented."


Comments

Comment viewing options

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

This API was not implemented in time for OpenTK 1.0 and will be disabled in 1.0 beta-2. It will hopefully be part of OpenTK 1.1.

In the meanwhile, you can use OpenTK.GameWindow.Keyboard or System.Windows.Forms.Control.KeyDown/KeyUp for keyboard input.

iliak's picture

You can have a look at my Keyboard class as a work around.