im currently working on my final project in greenfoot for school and i want to create a cheat code by press "up" "up" "down" down" "left" "right "left" "right" "b" "a" in a row and then something happens my question is how do you save the memory of keypressed using arrays so that when all of these keys have been pressed in the correct sequence something else happens

