NEW - Implemented official logic for keypad.