Prevent from adding keyListener in keyPressed