Unfortunately this isn’t one button because you also have a directional input. You could solve this by holding the button and having that activate an arrow that circles around the box, then release when the arrow is facing the direction you want to go.
I also think the game would benefit from ramping up the difficulty after the initial round teaches you the mechanics. It would also be great if the patterns were actually pixel art.