OpenTK.Input.KeyboardState Struct Reference

Encapsulates the state of a Keyboard device. More...

List of all members.

Public Types

enum  BitValue { Zero = 0, One = 1 }

Public Member Functions

bool IsKeyDown (Key key)
 Gets a System.Boolean indicating whether this key is down.
bool IsKeyUp (Key key)
 Gets a System.Boolean indicating whether this key is up.
internal int ReadBit (int offset)
internal void WriteBit (int offset, BitValue bit)
bool Equals (KeyboardState other)
 Compares two KeyboardState instances.

Public Attributes

const int NumKeys = ((int)Key.LastKey + 16) / 32

Detailed Description

Encapsulates the state of a Keyboard device.

Definition at line 37 of file KeyboardState.cs.


Member Function Documentation

bool OpenTK.Input.KeyboardState.Equals ( KeyboardState  other  ) 

Compares two KeyboardState instances.

Parameters:
other The instance to compare two.
Returns:
True, if both instances are equal; false otherwise.

Definition at line 98 of file KeyboardState.cs.

00099         {
00100             throw new NotImplementedException();
00101         }

bool OpenTK.Input.KeyboardState.IsKeyDown ( Key  key  ) 

Gets a System.Boolean indicating whether this key is down.

Parameters:
key The OpenTK.Input.Key to check.

Definition at line 58 of file KeyboardState.cs.

00059         {
00060             return ReadBit((int)key) != 0;
00061         }

bool OpenTK.Input.KeyboardState.IsKeyUp ( Key  key  ) 

Gets a System.Boolean indicating whether this key is up.

Parameters:
key The OpenTK.Input.Key to check.

Definition at line 67 of file KeyboardState.cs.

00068         {
00069             return ReadBit((int)key) == 0;
00070         }

 All Classes Functions Variables Enumerations Properties Events

Generated on Tue Mar 9 15:06:30 2010 for The Open Toolkit library by  doxygen 1.6.1