C# Class Artemis.Engine.Input.KeyboardInput

The main keyboard input provider class.
Show file Open project: ArtemisEngine/Artemis-Engine Class Usage Examples

Public Methods

Method Description
IsClicked ( KeyCombination keys ) : bool

Check if a combination of keys have been clicked (i.e. has been pressed for exactly 1 frame).

IsClicked ( Keys key ) : bool

Check if a key has been clicked (i.e. has been pressed for exactly 1 frame).

IsHeld ( KeyCombination keys ) : bool

Check if a combination of keys have been pressed for any number of keys.

IsHeld ( Keys key ) : bool

Check if a key has been pressed for any number of keys.

IsHeldFor ( KeyCombination keys, int frames ) : bool

Check if a combination of keys have been pressed for exactly the given number of frames.

IsHeldFor ( Keys key, int frames ) : bool

Check if a key has been pressed for exactly the given number of frames.

IsHeldForAtleast ( KeyCombination keys, int frames ) : bool

Check if a combination of keys have been pressed for at least the given number of frames.

IsHeldForAtleast ( Keys key, int frames ) : bool

Check if a key has been pressed for at least the given number of frames.

IsIdleFor ( int frames ) : bool

Check if the keyboard has been idle for exactly the given number of frames.

IsIdleForAtleast ( int frames ) : bool

Check if the keyboard has been idle for at least the given number of frames.

IsReleased ( KeyCombination keys ) : bool

Check if a combination of keys have been released (i.e. has been unpressed for exactly 1 frame).

IsReleased ( Keys key ) : bool

Check if a key has been released (i.e. has been unpressed for exactly 1 frame).

IsUnheld ( KeyCombination keys ) : bool

Check if a combination of keys have been unpressed for any number of frames.

IsUnheld ( Keys key ) : bool

Check if a key has been unpressed for any number of frames.

IsUnheldFor ( KeyCombination keys, int frames ) : bool

Check if a combination of keys have been unpressed for exactly the given number of frames.

IsUnheldFor ( Keys key, int frames ) : bool

Check if a key has been unpressed for exactly the given number of frames.

IsUnheldForAtleast ( KeyCombination keys, int frames ) : bool

Check if a combination of keys have been unpressed for at least the given number of frames.

IsUnheldForAtleast ( Keys key, int frames ) : bool

Check if a key has been unpressed for at least the given number of frames.

Private Methods

Method Description
KeyboardInput ( ) : System.Collections.Generic
Update ( ) : void

Method Details

IsClicked() public method

Check if a combination of keys have been clicked (i.e. has been pressed for exactly 1 frame).
public IsClicked ( KeyCombination keys ) : bool
keys KeyCombination
return bool

IsClicked() public method

Check if a key has been clicked (i.e. has been pressed for exactly 1 frame).
public IsClicked ( Keys key ) : bool
key Keys
return bool

IsHeld() public method

Check if a combination of keys have been pressed for any number of keys.
public IsHeld ( KeyCombination keys ) : bool
keys KeyCombination
return bool

IsHeld() public method

Check if a key has been pressed for any number of keys.
public IsHeld ( Keys key ) : bool
key Keys
return bool

IsHeldFor() public method

Check if a combination of keys have been pressed for exactly the given number of frames.
public IsHeldFor ( KeyCombination keys, int frames ) : bool
keys KeyCombination
frames int
return bool

IsHeldFor() public method

Check if a key has been pressed for exactly the given number of frames.
public IsHeldFor ( Keys key, int frames ) : bool
key Keys
frames int
return bool

IsHeldForAtleast() public method

Check if a combination of keys have been pressed for at least the given number of frames.
public IsHeldForAtleast ( KeyCombination keys, int frames ) : bool
keys KeyCombination
frames int
return bool

IsHeldForAtleast() public method

Check if a key has been pressed for at least the given number of frames.
public IsHeldForAtleast ( Keys key, int frames ) : bool
key Keys
frames int
return bool

IsIdleFor() public method

Check if the keyboard has been idle for exactly the given number of frames.
public IsIdleFor ( int frames ) : bool
frames int
return bool

IsIdleForAtleast() public method

Check if the keyboard has been idle for at least the given number of frames.
public IsIdleForAtleast ( int frames ) : bool
frames int
return bool

IsReleased() public method

Check if a combination of keys have been released (i.e. has been unpressed for exactly 1 frame).
public IsReleased ( KeyCombination keys ) : bool
keys KeyCombination
return bool

IsReleased() public method

Check if a key has been released (i.e. has been unpressed for exactly 1 frame).
public IsReleased ( Keys key ) : bool
key Keys
return bool

IsUnheld() public method

Check if a combination of keys have been unpressed for any number of frames.
public IsUnheld ( KeyCombination keys ) : bool
keys KeyCombination
return bool

IsUnheld() public method

Check if a key has been unpressed for any number of frames.
public IsUnheld ( Keys key ) : bool
key Keys
return bool

IsUnheldFor() public method

Check if a combination of keys have been unpressed for exactly the given number of frames.
public IsUnheldFor ( KeyCombination keys, int frames ) : bool
keys KeyCombination
frames int
return bool

IsUnheldFor() public method

Check if a key has been unpressed for exactly the given number of frames.
public IsUnheldFor ( Keys key, int frames ) : bool
key Keys
frames int
return bool

IsUnheldForAtleast() public method

Check if a combination of keys have been unpressed for at least the given number of frames.
public IsUnheldForAtleast ( KeyCombination keys, int frames ) : bool
keys KeyCombination
frames int
return bool

IsUnheldForAtleast() public method

Check if a key has been unpressed for at least the given number of frames.
public IsUnheldForAtleast ( Keys key, int frames ) : bool
key Keys
frames int
return bool