MayaFlux 0.4.0
Digital-First Multimedia Processing Framework
Loading...
Searching...
No Matches

◆ is_key_pressed()

bool MayaFlux::Vruta::EventSource::is_key_pressed ( IO::Keys  key) const

Query if a specific key is currently pressed.

Parameters
keyThe key to check
Returns
True if key is currently pressed

Definition at line 130 of file EventSource.cpp.

131{
132 auto key_int = static_cast<int16_t>(key);
133 auto it = m_key_states.find(key_int);
134 return it != m_key_states.end() && it->second;
135}
std::unordered_map< int16_t, bool > m_key_states

References m_key_states.