Is there a method to register a keypress when the key is pressed (for example an 'up' key) and not after the key is released?
// instance field
private boolean upDown;
// in act
if (upDown != Greenfoot.isKeyDown("up")) // was there change in state of key
{
upDown = ! upDown; // record new state
if (upDown) // was state changed from 'up' to 'down'
{
// do what you do when "up" key is pressed
}
}