added long existing code for the pilot keypad