MCPcopy Create free account
hub / github.com/defold/defold / GetKey

Function GetKey

engine/hid/src/hid.cpp:286–294  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

284 }
285
286 bool GetKey(KeyboardPacket* packet, Key key)
287 {
288 int key_index = (int) key - dmPlatform::PLATFORM_KEY_START;
289
290 if (packet != 0x0)
291 return packet->m_Keys[key_index / 32] & (1 << (key_index % 32));
292 else
293 return false;
294 }
295
296 void SetKey(HKeyboard keyboard, Key key, bool value)
297 {

Callers 7

StepFrameFunction · 0.50
TEST_FFunction · 0.50
AppendKeyboardStatusFunction · 0.50
EngineUpdateFunction · 0.50
UpdateFunction · 0.50
RunFunction · 0.50
UpdateBindingFunction · 0.50

Calls

no outgoing calls

Tested by 4

TEST_FFunction · 0.40
AppendKeyboardStatusFunction · 0.40
EngineUpdateFunction · 0.40
RunFunction · 0.40