C# Class Evbpc.Framework.Xna.Utilities.KeyboardStateManager

This provides an easy-to-use class to interact with the Keyboard in an XNA game.
Datei anzeigen Open project: EBrown8534/Framework

Public Methods

Method Description
GetKeyChar ( Evbpc.Framework.Windows.Forms.Keys key ) : char

Gets the char value represented by the Keys that was sent.

Update ( KeyboardState kState ) : void

Updates the internal KeyboardState and fires relevant events.

Protected Methods

Method Description
OnKeyDown ( KeyEventArgs e ) : void

Raises the KeyDown event.

http://msdn.microsoft.com/en-us/library/system.windows.forms.control.onkeydown(v=vs.110).aspx

OnKeyPress ( KeyPressEventArgs e ) : void

Raises the KeyPress event.

http://msdn.microsoft.com/en-us/library/system.windows.forms.control.onkeypress(v=vs.110).aspx

OnKeyUp ( KeyEventArgs e ) : void

Raises the KeyUp event.

http://msdn.microsoft.com/en-us/library/system.windows.forms.control.onkeyup(v=vs.110).aspx

Private Methods

Method Description
GetPressedKeys ( ) : List
GetPressedKeys ( KeyboardState k ) : List
IsKeyDown ( List pressedKeys, Evbpc.Framework.Windows.Forms.Keys key ) : bool
IsKeyUp ( List pressedKeys, Evbpc.Framework.Windows.Forms.Keys key ) : bool
IsPressedState ( List pressedKeys, Evbpc.Framework.Windows.Forms.Keys key, bool state ) : bool
XnaKeyToKey ( Microsoft.Xna.Framework.Input.Keys key ) : Evbpc.Framework.Windows.Forms.Keys

Method Details

GetKeyChar() public static method

Gets the char value represented by the Keys that was sent.
public static GetKeyChar ( Evbpc.Framework.Windows.Forms.Keys key ) : char
key Evbpc.Framework.Windows.Forms.Keys The enumeration value to examine.
return char

OnKeyDown() protected method

Raises the KeyDown event.
http://msdn.microsoft.com/en-us/library/system.windows.forms.control.onkeydown(v=vs.110).aspx
protected OnKeyDown ( KeyEventArgs e ) : void
e KeyEventArgs A that contains the event data.
return void

OnKeyPress() protected method

Raises the KeyPress event.
http://msdn.microsoft.com/en-us/library/system.windows.forms.control.onkeypress(v=vs.110).aspx
protected OnKeyPress ( KeyPressEventArgs e ) : void
e Evbpc.Framework.Windows.Forms.KeyPressEventArgs A that contains the event data.
return void

OnKeyUp() protected method

Raises the KeyUp event.
http://msdn.microsoft.com/en-us/library/system.windows.forms.control.onkeyup(v=vs.110).aspx
protected OnKeyUp ( KeyEventArgs e ) : void
e KeyEventArgs A that contains the event data.
return void

Update() public method

Updates the internal KeyboardState and fires relevant events.
public Update ( KeyboardState kState ) : void
kState Microsoft.Xna.Framework.Input.KeyboardState The new KeyboardState.
return void