Added a key listener to the GamePanel.