Allowed pressing Key3 to exit from Input loop