#include <Keyboard.h>
|
| void | update () |
| | Reset the state and events and update them from the eventQueue.
|
| |
| void | submitKeyDown (Key key, double timestamp) |
| | Queue key down event for being processed in the next update.
|
| |
| void | submitKeyUp (Key key, double timestamp) |
| | Queue key up event for being processed in the next update.
|
| |
| void | submitChar (std::string ch, double timestamp) |
| | Queue char event for being processed in the next update.
|
| |
| void | submitReset (double timestamp) |
| | Queue reset event for being processed in the next update.
|
| |
| bool | isKeyDown (Key key) const |
| |
| bool | isKeyUp (Key key) const |
| |
| bool | hasChar (std::string_view ch) const |
| |
| bool | wasKeyPressed (Key key) const |
| | Return true if the key was pressed in the last frame, false otherwise.
|
| |
| bool | wasKeyReleased (Key key) const |
| | Return true if the key was released in the last frame, false otherwise.
|
| |
| const State & | getState () const |
| | Get the previous frame's keyboard state. Updated at the beginning of each new frame.
|
| |
| const std::vector< Event > & | getEvents () const |
| | Get the previous frame's event list. Updated at the beginning of each new frame.
|
| |
◆ getEvents()
| const std::vector< Event > & Cogs::Keyboard::getEvents |
( |
| ) |
const |
|
inline |
Get the previous frame's event list. Updated at the beginning of each new frame.
◆ getState()
| const State & Cogs::Keyboard::getState |
( |
| ) |
const |
|
inline |
Get the previous frame's keyboard state. Updated at the beginning of each new frame.
◆ hasChar()
| bool Cogs::Keyboard::hasChar |
( |
std::string_view |
ch | ) |
const |
|
inline |
◆ isKeyDown()
| bool Cogs::Keyboard::isKeyDown |
( |
Key |
key | ) |
const |
|
inline |
◆ isKeyUp()
| bool Cogs::Keyboard::isKeyUp |
( |
Key |
key | ) |
const |
|
inline |
◆ submitChar()
| void Cogs::Keyboard::submitChar |
( |
std::string |
ch, |
|
|
double |
timestamp |
|
) |
| |
Queue char event for being processed in the next update.
◆ submitKeyDown()
| void Cogs::Keyboard::submitKeyDown |
( |
Key |
key, |
|
|
double |
timestamp |
|
) |
| |
Queue key down event for being processed in the next update.
◆ submitKeyUp()
| void Cogs::Keyboard::submitKeyUp |
( |
Key |
key, |
|
|
double |
timestamp |
|
) |
| |
Queue key up event for being processed in the next update.
◆ submitReset()
| void Cogs::Keyboard::submitReset |
( |
double |
timestamp | ) |
|
Queue reset event for being processed in the next update.
◆ update()
| void Cogs::Keyboard::update |
( |
| ) |
|
◆ wasKeyPressed()
| bool Cogs::Keyboard::wasKeyPressed |
( |
Key |
key | ) |
const |
Return true if the key was pressed in the last frame, false otherwise.
◆ wasKeyReleased()
| bool Cogs::Keyboard::wasKeyReleased |
( |
Key |
key | ) |
const |
Return true if the key was released in the last frame, false otherwise.
◆ eventQueue
| std::vector<Event> Cogs::Keyboard::eventQueue |
|
private |
◆ events
| std::vector<Event> Cogs::Keyboard::events |
|
private |
◆ state
| State Cogs::Keyboard::state |
|
private |
The documentation for this class was generated from the following files: