MayaFlux 0.3.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 119 of file EventSource.cpp.

120{
121 auto key_int = static_cast<int16_t>(key);
122 auto it = m_key_states.find(key_int);
123 return it != m_key_states.end() && it->second;
124}
std::unordered_map< int16_t, bool > m_key_states

References m_key_states.