Partial keypad support and fixes for mode 4.