keypad and menu code patch