I'm trying to figure out how to get a key released event. I'm using code from the helloworld
private void keyAffected(KeyState state) {
int code=state.getKeyCode();
boolean event=state.getState();
switch (code) {
case (KeyEvent.VK_LEFT): {
left=event;
break;
}
case (KeyEvent.VK_RIGHT): {
right=event;
break;
}
case (KeyEvent.VK_DOWN):{
downPressed = event;
}
}
}
A key released is false, but that's sort of a do nothing state also.