2D grid array question

Sorry, you can leave keyPressed inside the class but you have to call it from a function with the same name outside the class