ezEngine  Release 25.03
ezKeyState Struct Reference

This struct defines the different states a key can be in. All keys always go through the states 'Pressed' and 'Released', even if they are active for only one frame. A key is 'Down' when it is pressed for at least two frames. It is 'Up' when it is not pressed for at least two frames. More...

#include <Declarations.h>

Public Types

enum  Enum { Up, Released, Pressed, Down }
 

Static Public Member Functions

static ezKeyState::Enum GetNewKeyState (ezKeyState::Enum prevState, bool bKeyDown)
 Computes the new key state from a previous key state and whether it is currently pressed or not.
 

Detailed Description

This struct defines the different states a key can be in. All keys always go through the states 'Pressed' and 'Released', even if they are active for only one frame. A key is 'Down' when it is pressed for at least two frames. It is 'Up' when it is not pressed for at least two frames.

Member Enumeration Documentation

◆ Enum

Enumerator
Up 

Key is not pressed at all.

Released 

Key has just been released this frame.

Pressed 

Key has just been pressed down this frame.

Down 

Key is pressed down for longer than one frame now.


The documentation for this struct was generated from the following files: