I want to check if a key was just pressed, and released quickly, in short.
public boolean keyClicked(int key)
{
while (Keyboard.next())
if (Keyboard.getEventKeyState())
if (Keyboard.getEventKey() == key)
return true;
return false;
}
I have been using this code, but it does not seem to work twice in the same update frame. If it was checked once, it won’t check any others again for some reason…
Thanks,
-wes