add resetLastKeyPressed () method to canvas class