Multi-tap keypad library (or just one function)

Here is my program that interacts with the multi_tap function. It writes on an HD44780 display. The guy outside in the courtyard has been on the ride-on lawn mower since like 2pm and I would have recorded a video if he weren't making so much noise.:

void loop()
{
  int ret=0;
  byte key=panel_keypad.getKey(); // Get a key press from the keypad
  ret=multi_tap(key); // Feed the key press to the multi_tap function.
  if ((ret&256)!=0) // If this is non-zero, we got a key. Handle some special keys or just print the key on screen
  {
    switch (ret&255)
    {
      case '\b':
      if ((pointer%lcd_columns)==0)
      {
        if (rowp>0)
        {
          rowp--;
          pointer=lcd_columns-2;
        }
      }
      else pointer--;
      lcd.setCursor(pointer,rowp);
      lcd.write(' ');
      lcd.setCursor(pointer,rowp);
      return;
      break;
      case '\n':
      pointer=0;
      rowp++;
      rowp%=lcd_rows;
      lcd.setCursor(pointer,rowp);
      return;
      break;
    }
    lcd.setCursor(pointer,rowp);
    lcd.write(lowByte(ret));
    pointer++;
    if (pointer>=lcd_columns)
    {
      pointer=0;
      rowp++;
    }
  }
  else if (ret) // We don't have a key but the user is still cycling through characters on one key so we need to update the screen
  {
    lcd.setCursor(pointer,rowp);
    lcd.write(lowByte(ret));
  }
}

He's probably done now. BTW, the courtyard is big.

Here is a picture. I'll be recording a video soon.