I've got functioning menu layers for my game so that when you have a button that brings you into another menu, that works.
My problem is, I want to have it so that when the player presses the escape key, it will be a quick way to go one layer of menus up, so they don't have to actually reach over and click a button to do so. If I just used Greenfoot.isKeyDown(), though, I'd end up with people accidentally going back to the very highest layer whenever they tapped escape.
Should I just resign myself to a cooldown timer or is there a detect release method?

