Menu Problem on 128*64 GLCD and keypad

I am trying to modify on the menu code to be able to use a keypad shield and arduino for scrolling between lines. after uploading and trying the code the following has happened:
1- I can not scroll more than 2 lines.
2- If I press D, I can scroll to another 2 lines.
What is the problem in this code?

#include <String.h>
#include<AccelStepper.h>
#include <Keypad.h>
#include "U8glib.h"

U8GLIB_ST7920_128X64_1X u8g(12, 11, 10, 13);

//Keypad setup
const byte ROWS = 4;
const byte COLS = 4;
char hexaKeys [ROWS][COLS] = {
{'1', '2', '3', 'A'},
{'4', '5', '6', 'B'},
{'7', '8', '9', 'C'},
{'*', '0', '#', 'D'}
};
byte rowPins [ROWS] = {5, 4, 3, 2};
byte colPins [COLS] = {9, 8, 7, 6};
Keypad customKeypad = Keypad (makeKeymap(hexaKeys), rowPins, colPins, ROWS, COLS);

#define KEY_NONE 0
#define KEY_PREV 1
#define KEY_NEXT 2
#define KEY_SELECT 3
#define KEY_BACK 4

uint8_t keycode1 = KEY_NONE;
uint8_t keycode2 = KEY_NONE;
uint8_t keycode = KEY_NONE;

void keymode(void){
keycode2 = keycode1;
char keypressed = customKeypad.getKey();
if (keypressed != NO_KEY){
switch (keypressed){
case 'A':
keycode1 = KEY_PREV;
Serial.println("A");
break;
case'B':
keycode1 = KEY_NEXT;
Serial.println("B");
break;
case 'C':
keycode1 = KEY_SELECT;
Serial.println("C");
break;
case 'D':
keycode1 = KEY_BACK;
Serial.println("D");
break;
}
if (keypressed != 'A' && keypressed != 'B' && keypressed !='C' && keypressed != 'D')
keycode1 = KEY_NONE;
}
if (keycode2 == keycode1)
keycode = keycode1;
else
keycode = KEY_NONE;
}

#define MENU_ITEMS 4
const char *menu_strings[MENU_ITEMS] = {"Start", "Hello", "Let's Go", "End"};

uint8_t menu_current = 0;
uint8_t menu_redraw = 0;
uint8_t Last_key_code = KEY_NONE;

void drawmenu(void){
uint8_t i, h;
u8g_uint_t w, d;
u8g.setFont(u8g_font_6x13);
u8g.setFontRefHeightText();
u8g.setFontPosTop();

h = u8g.getFontAscent()-u8g.getFontDescent();
w = u8g.getWidth();
for( i = 0; i < MENU_ITEMS; i++ ) {
d = (w-u8g.getStrWidth(menu_strings[i]))/2;
u8g.setDefaultForegroundColor();
if ( i == menu_current ) {
u8g.drawBox(0, ih+1, w, h);
u8g.setDefaultBackgroundColor();
}
u8g.drawStr(d, ih, menu_strings[i]);
}
}

void updatemenu(void){
if (keycode != KEY_NONE && Last_key_code == keycode) {
return;
}
Last_key_code = keycode;

switch(keycode){
case KEY_NEXT:
menu_current ++;
if (menu_current >= MENU_ITEMS)
menu_current =0;
menu_redraw = 1;

break;

case KEY_PREV: 
if (menu_current ==0) 
menu_current = MENU_ITEMS;
menu_current --;
menu_redraw = 1;

break;
}
}

void setup (){
Serial.begin(9600);
menu_redraw = 1;
}

void loop (){
keymode();
if (menu_redraw !=0) {
u8g.firstPage();
do{
drawmenu();
}while(u8g.nextPage());
menu_redraw = 0;
}
updatemenu();
}

What is the problem in this code?

The problem is that that is NOT what your code looks like. If you had bothered to read the stickies, that you were supposed to read BEFORE posting, you would have learned how to post your code properly, so that it actually looked like the code you were running.

uint8_t keycode1 = KEY_NONE;
uint8_t keycode2 = KEY_NONE;
uint8_t keycode = KEY_NONE;

If you had any imagination, I'm sure that you could have come up with meaningful names.

I know that this is not my code,
and I did not say it is mine.
If you read well you will find that I said I am modifying in the code to be able to use it.
I only need to use this code with the keypad shield. So the mentioned problems have appeared to me.
If you can HELP, write a solution and help, and do not blame others of their inability to post or their code names.

The reference code that I modified on was this code:

#include "U8glib.h"
#define KEY_NONE 0
#define KEY_PREV 1
#define KEY_NEXT 2
#define KEY_SELECT 3
#define KEY_BACK 4

// DOGS102 shield configuration values
//uint8_t uiKeyPrev = 2;
//uint8_t uiKeyNext = 4;
//uint8_t uiKeySelect = 5;
//uint8_t uiKeyBack = 3;

// DOGM128-Shield	 configuration values
// DOGXL60-Shield configuration values
uint8_t uiKeyPrev = 7;
uint8_t uiKeyNext = 3;
uint8_t uiKeySelect = 2;
uint8_t uiKeyBack = 8;
uint8_t uiKeyCodeFirst = KEY_NONE;
uint8_t uiKeyCodeSecond = KEY_NONE;
uint8_t uiKeyCode = KEY_NONE;
void uiSetup(void) {

  // configure input keys 
  
  pinMode(uiKeyPrev, INPUT_PULLUP);           // set pin to input with pullup
  pinMode(uiKeyNext, INPUT_PULLUP);           // set pin to input with pullup
  pinMode(uiKeySelect, INPUT_PULLUP);           // set pin to input with pullup
  pinMode(uiKeyBack, INPUT_PULLUP);           // set pin to input with pullup
}


void uiStep(void) {
  uiKeyCodeSecond = uiKeyCodeFirst;
  if ( digitalRead(uiKeyPrev) == LOW )
    uiKeyCodeFirst = KEY_PREV;
  else if ( digitalRead(uiKeyNext) == LOW )
    uiKeyCodeFirst = KEY_NEXT;
  else if ( digitalRead(uiKeySelect) == LOW )
    uiKeyCodeFirst = KEY_SELECT;
  else if ( digitalRead(uiKeyBack) == LOW )
    uiKeyCodeFirst = KEY_BACK;
  else 
    uiKeyCodeFirst = KEY_NONE;
  
  if ( uiKeyCodeSecond == uiKeyCodeFirst )
    uiKeyCode = uiKeyCodeFirst;
  else
    uiKeyCode = KEY_NONE;
}


#define MENU_ITEMS 4

const char *menu_strings[MENU_ITEMS] = { "First Line", "Second Item", "3333333", "abcdefg" };
uint8_t menu_current = 0;
uint8_t menu_redraw_required = 0;
uint8_t last_key_code = KEY_NONE;
void drawMenu(void) {

  uint8_t i, h;
  u8g_uint_t w, d;
  u8g.setFont(u8g_font_6x13);
  u8g.setFontRefHeightText();
  u8g.setFontPosTop();
  
  h = u8g.getFontAscent()-u8g.getFontDescent();
  w = u8g.getWidth();
  for( i = 0; i < MENU_ITEMS; i++ ) {
    d = (w-u8g.getStrWidth(menu_strings[i]))/2;
    u8g.setDefaultForegroundColor();
    if ( i == menu_current ) {
      u8g.drawBox(0, i*h+1, w, h);
      u8g.setDefaultBackgroundColor();
    }
    u8g.drawStr(d, i*h, menu_strings[i]);
  }
}

void updateMenu(void) {
  if ( uiKeyCode != KEY_NONE && last_key_code == uiKeyCode ) {
    return;
  }

  last_key_code = uiKeyCode;
  
  switch ( uiKeyCode ) {
    case KEY_NEXT:
      menu_current++;
      if ( menu_current >= MENU_ITEMS )
        menu_current = 0;
      menu_redraw_required = 1;
      break;
    case KEY_PREV:
      if ( menu_current == 0 )
        menu_current = MENU_ITEMS;
      menu_current--;
      menu_redraw_required = 1;
      break;
  }
}

void setup() {
  // rotate screen, if required
  // u8g.setRot180();
  
  uiSetup();                                // setup key detection and debounce algorithm
  menu_redraw_required = 1;     // force initial redraw
}

void loop() {  
  uiStep();                                     // check for key press
    
  if (  menu_redraw_required != 0 ) {
    u8g.firstPage();
    do  {
      drawMenu();
    } while( u8g.nextPage() );
    menu_redraw_required = 0;
  }
  updateMenu();                            // update menu bar
  
}

If you can HELP, write a solution and help, and do not blame others of their inability to post or their code names.

You expect us to help you, even though you don't want to play by the rules. Good luck with that attitude.

My attitude or Yours?
Do not Start a fight and then run away from it, and if you really respect the rules you wouldn't say such words.
Try to know how to encourage people to ask questions here instead of fighting with them.

My attitude or Yours?

Your attitude. You got all pissy when I pointed out that you forgot to use code tags.

Because you said it with a bad method.
I did not know from first how to write a question. This is my first time. And also I did not see the stickies until you mentioned them.
If you only mentioned by a better method I would have appreciated it.
I never meant to be rude with anyone, but do not make me angry and then say "This is you"