keyPressed instead of keyReleased