Ctrl+K

IKeyboard

Declaration

public interface Strawberry.Input.IKeyboard

Defines an interface for keyboard input handling, providing access to key states and methods to query and simulate keyboard events.

Properties

DownKeys abstract

Gets the collection of keys that are currently being held down.

IEnumerable<Keys> DownKeys { get }

PressedKeys abstract

Gets the collection of keys that were pressed during the current frame.

IEnumerable<Keys> PressedKeys { get }

ReleasedKeys abstract

Gets the collection of keys that were released during the current frame.

IEnumerable<Keys> ReleasedKeys { get }

Methods

FirePressed abstract

Triggers the pressed state for the specified key. Typically called by the input backend to signal a key press event.

void FirePressed(Keys key)

Parameters:

Name Type Description
key Strawberry.Input.Keys The key that was pressed.

FireReleased abstract

Triggers the released state for the specified key. Typically called by the input backend to signal a key release event.

void FireReleased(Keys key)

Parameters:

Name Type Description
key Strawberry.Input.Keys The key that was released.

IsKeyDown abstract

Determines whether the specified key is currently being held down.

bool IsKeyDown(Keys key)

Parameters:

Name Type Description
key Strawberry.Input.Keys The key to check.

Returns: true if the key is currently held down; otherwise, false.

IsKeyPressed abstract

Determines whether the specified key was just pressed during the current frame.

bool IsKeyPressed(Keys key)

Parameters:

Name Type Description
key Strawberry.Input.Keys The key to check.

Returns: true if the key was pressed in this frame; otherwise, false.

IsKeyReleased abstract

Determines whether the specified key was just released during the current frame.

bool IsKeyReleased(Keys key)

Parameters:

Name Type Description
key Strawberry.Input.Keys The key to check.

Returns: true if the key was released in this frame; otherwise, false.