Changed KeyListener to KeyAdapter