AgateLib.InputLib.Keyboard Class Reference

Static class which represents Keyboard input. More...

List of all members.

Classes

class  KeyState
 Class which represents the state of all keys on the keyboard. More...

Static Public Member Functions

static void ReleaseAllKeys ()
 Resets all keys to being in the up state (not pushed). Does generate KeyUp events.
static void ReleaseAllKeys (bool waitForKeyUp)
 Resets all keys to being in the up state (not pushed). Does generate KeyUp events.

This can also make it so any keys which were depressed must be released before KeyDown events are raised again.

.

static void ReleaseKey (KeyCode key)
 Resets a particular key to being in the up state (not pushed). Generates a KeyUp event for that key.

This also makes it so that the key must be physically depressed by the user before it will register a KeyDown event again. If it is already depressed, it must be released first.

.

static void ReleaseKey (KeyCode key, bool waitForKeyUp)
 Resets a particular key to being in the up state (not pushed). Generates a KeyUp event for that key.
static string GetKeyString (KeyCode keyID, KeyModifiers mods)
 Creates a string from the specified KeyCode and KeyModifiers. Unfortunately this is tied to the US English keyboard, so it needs a better solution.

Properties

static KeyState Keys [get]
 Gets an object representing the state of all keys on the keyboard.
static bool AnyKeyPressed [get]
 Checks to see if the user pressed the "Any" key.

Events

static InputEventHandler KeyDown = \"
 Event which occurs when a key is pressed.
static InputEventHandler KeyUp
 Event which occurs when a key is released.


Detailed Description

Static class which represents Keyboard input.


Member Function Documentation

static string AgateLib.InputLib.Keyboard.GetKeyString ( KeyCode  keyID,
KeyModifiers  mods 
) [static]

Creates a string from the specified KeyCode and KeyModifiers. Unfortunately this is tied to the US English keyboard, so it needs a better solution.

Parameters:
keyID 
mods 
Returns:

static void AgateLib.InputLib.Keyboard.ReleaseAllKeys ( bool  waitForKeyUp  )  [static]

Resets all keys to being in the up state (not pushed). Does generate KeyUp events.

This can also make it so any keys which were depressed must be released before KeyDown events are raised again.

.

Parameters:
waitForKeyUp If true, then keys currently depressed will not generate KeyDown events until they are released.

static void AgateLib.InputLib.Keyboard.ReleaseAllKeys (  )  [static]

Resets all keys to being in the up state (not pushed). Does generate KeyUp events.

This also makes it so any keys which were depressed must be released before KeyDown events are raised again.

static void AgateLib.InputLib.Keyboard.ReleaseKey ( KeyCode  key,
bool  waitForKeyUp 
) [static]

Resets a particular key to being in the up state (not pushed). Generates a KeyUp event for that key.

Parameters:
key The key to be released.
waitForKeyUp If true, then keys currently depressed will not generate KeyDown events until they are released.

static void AgateLib.InputLib.Keyboard.ReleaseKey ( KeyCode  key  )  [static]

Resets a particular key to being in the up state (not pushed). Generates a KeyUp event for that key.

This also makes it so that the key must be physically depressed by the user before it will register a KeyDown event again. If it is already depressed, it must be released first.

.

Parameters:
key 


Property Documentation

bool AgateLib.InputLib.Keyboard.AnyKeyPressed [static, get]

Checks to see if the user pressed the "Any" key.

KeyState AgateLib.InputLib.Keyboard.Keys [static, get]

Gets an object representing the state of all keys on the keyboard.


Event Documentation

InputEventHandler AgateLib.InputLib.Keyboard.KeyDown = \" [static]

Event which occurs when a key is pressed.

InputEventHandler AgateLib.InputLib.Keyboard.KeyUp [static]

Event which occurs when a key is released.


The documentation for this class was generated from the following file:
AgateLib
Awesome Game and Tool Engine Library
SourceForge.net Logo