MochiEngine
Loading...
Searching...
No Matches
Mochi::Input::SDLKeyboardProvider Class Reference

Implementation of IKeyboardProvider that uses SDL_GetKeyboardState to retrieve keyboard data. More...

#include <SDLKeyboardProvider.h>

Inheritance diagram for Mochi::Input::SDLKeyboardProvider:
Mochi::Input::IKeyboardProvider

Public Member Functions

virtual const bool * GetState () const override
 Gets an array of boolean values defining if each keyboard key is being pressed this frame or not. Key mapping is responsability of each implementation, but currently should follow the SDL keycode definitions.
virtual size_t GetMaxKeys () const override
 Gets the maximum amount of keys, which is the size of the GetState array of bools.

Detailed Description

Implementation of IKeyboardProvider that uses SDL_GetKeyboardState to retrieve keyboard data.

Member Function Documentation

◆ GetMaxKeys()

size_t Mochi::Input::SDLKeyboardProvider::GetMaxKeys ( ) const
overridevirtual

Gets the maximum amount of keys, which is the size of the GetState array of bools.

Returns
The amount of keys the keyboard has.

Implements Mochi::Input::IKeyboardProvider.

◆ GetState()

const bool * Mochi::Input::SDLKeyboardProvider::GetState ( ) const
overridevirtual

Gets an array of boolean values defining if each keyboard key is being pressed this frame or not. Key mapping is responsability of each implementation, but currently should follow the SDL keycode definitions.

Returns
A pointer to a bool array.

Implements Mochi::Input::IKeyboardProvider.


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