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

Function SetKey

engine/hid/src/hid.cpp:296–307  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

294 }
295
296 void SetKey(HKeyboard keyboard, Key key, bool value)
297 {
298 if (keyboard != 0x0)
299 {
300 int key_index = (int) key - dmPlatform::PLATFORM_KEY_START;
301
302 if (value)
303 keyboard->m_Packet.m_Keys[key_index / 32] |= (1 << (key_index % 32));
304 else
305 keyboard->m_Packet.m_Keys[key_index / 32] &= ~(1 << (key_index % 32));
306 }
307 }
308
309 bool GetMouseButton(MousePacket* packet, MouseButton button)
310 {

Callers 2

TEST_FFunction · 0.85
TEST_FFunction · 0.85

Calls

no outgoing calls

Tested by 2

TEST_FFunction · 0.68
TEST_FFunction · 0.68