How can we receive key events/triggers using dmsdk?

I would like to receive key events from dmsdk.
So far, I’m getting the context in onAppInit:

static dmExtension::Result AppInitializeGameLib(dmExtension::AppParams* params)
{
    dmLogInfo("AppInitializeGameLib");
    m_HContext = dmEngine::GetHIDContext(params);
    m_Keyboard = dmHID::GetKeyboard(m_HContext, 0);

    return dmExtension::RESULT_OK;
}

But it looks like we don’t have access to dmHID::GetKeyboardPacket or dmHID::GetKey().
Am I missing something? Is it possible?

( There is a GetGamepadPacket and a GetMousePacket, but no GetKeyboardPacket.)

There are a lot of things we need to do in order to have feature parity with our Lua api.
While it will also be required for the example tutorial-side-scroller C++ version, we haven’t had time to work much on the C++ sdk.

Please open a feature request for this.

1 Like