14 Apr 2013, 9:08
(13 Apr 2013, 7:23)stranger Wrote: How can I detect if any keyboard key is currently being pressed? I'm not interested in what the key is.
You have to iterate through the Rawkey enum:
for (UInt32 i=RAWKEY_NONE; i<MAX_RAWKEY_CODES; i++)
{
RawKeyCode rawKey = static_cast<RawKeyCode>(i);
if ((deviceHandler->WasRawKeyPressed(rawKey)))
{
Debug::Trace("Key pressed");
Debug::Trace("RawKeyCode is %d", i);
}
}