Table of Contents

Class KeyboardInput

Namespace
Fantas.Input
Assembly
Fantas.dll

Keyboard Input class

public static class KeyboardInput
Inheritance
KeyboardInput
Inherited Members

Properties

AnyKeyPressed

Check if any key was just pressed

public static bool AnyKeyPressed { get; }

Property Value

bool

AnyKeyReleased

Check if any key was just released

public static bool AnyKeyReleased { get; }

Property Value

bool

Methods

InvokeKeyDown(Keys)

Invoke KeyDown event handlers

public static void InvokeKeyDown(Keys keys)

Parameters

keys Keys

InvokeKeyUp(Keys)

Invoke KeyUp event handlers

public static void InvokeKeyUp(Keys keyCode)

Parameters

keyCode Keys

IsKeyDown(Keys)

Check the if the given key from keyboard is down

public static bool IsKeyDown(Keys keyCode)

Parameters

keyCode Keys

Keyboard key (Q, W, A, S, Space, etc)

Returns

bool

IsKeyPressed(Keys)

Check the if the given key was just pressed

public static bool IsKeyPressed(Keys keyCode)

Parameters

keyCode Keys

Keyboard key (Q, W, A, S, Space, etc)

Returns

bool

Return true if the key was just pressed

IsKeyReleased(Keys)

Check the if the given key was just released

public static bool IsKeyReleased(Keys keyCode)

Parameters

keyCode Keys

Keyboard key (Q, W, A, S, Space, etc)

Returns

bool

Return true if the key was just released

IsKeyUp(Keys)

Check the if the given key from keyboard is up

public static bool IsKeyUp(Keys keyCode)

Parameters

keyCode Keys

Keyboard key (Q, W, A, S, Space, etc)

Returns

bool

Return true if the key is not pressed