Nube new code reviewed

Is there a simpler way to write this?

There are 8 buttons on a joystick im using.
#include <Keypad.h>
#include <LiquidCrystal.h>

const byte ROWS = 4; //four rows
const byte COLS = 2; //three columns
char keys[ROWS][COLS] = {
{'1','2'},
{'3','4'},
{'5','6'},
{'7','8'}
};
byte rowPins[ROWS] = {48, 46 , 44, 42}; //connect to the row pinouts of the keypad
byte colPins[COLS] = {52, 50}; //connect to the column pinouts of the keypad

Keypad keypad = Keypad( makeKeymap(keys), rowPins, colPins, ROWS, COLS );

// initialize the library with the numbers of the interface pins
LiquidCrystal lcd(2, 3, 4, 5, 6, 7);

int pb =0;

void setup() {
Serial.begin(9600);

}
void loop(){
char key = keypad.getKey();

switch (key){
case '1':
lcd.begin(16, 2);
lcd.print("JS Foward");
break;

case '2':
lcd.begin(16, 2);
lcd.print("Trigger Pressed");
break;

case '3':
lcd.begin(16, 2);
lcd.print("JS Right");
break;

case '4':
lcd.begin(16, 2);
lcd.print("Left PB");
break;

case '5':
lcd.begin(16, 2);
lcd.print("JS Back");
break;

case '6':
lcd.begin(16, 2);
lcd.print("Right PB Top");
break;

case '7':
lcd.begin(16, 2);
lcd.print("JS Left");
break;

case '8':
lcd.begin(16, 2);
lcd.print("Right PB Back");
break;
}
}

A key idea is to dispense with giving the keys "human" names and instead assign them values that are more convenient to the program:

#include <Keypad.h>
 #include <LiquidCrystal.h>
 
 const byte ROWS = 4; //four rows
 const byte COLS = 2; //three columns
 char keys[ROWS][COLS] = {
   {0,1},
   {2,3},
   {4,5},
   {6,7}
 };
 byte rowPins[ROWS] = {48, 46 , 44, 42}; //connect to the row pinouts of the keypad
 byte colPins[COLS] = {52, 50}; //connect to the column pinouts of the keypad
 
 Keypad keypad = Keypad( makeKeymap(keys), rowPins, colPins, ROWS, COLS );
 
 // initialize the library with the numbers of the interface pins
 LiquidCrystal lcd(2, 3, 4, 5, 6, 7);

 int pb =0;
 
 void setup() {
     Serial.begin(9600);  
 }

char *keynames[] = { "JS Foward",
"Trigger Pressed",
"JS Right",
"Left PB",
"JS Back",
"Right PB Top",
"JS Left"
};

void loop(){
 char key = keypad.getKey();
   if (key >= 0 && key < 8) {
        lcd.begin(16, 2);
        lcd.print(keynames[key]);
   } else {
      lcd.print("unknown key");
   }
}

Thanks for the response.

I just used the named to help me learn to program and display what button.

I would like to use this for the joystick input and reference the key being pressed for different function in the program

like change menus on the lcd and speed up and slow down a motor.

This program is for a gattlin gun prop im building

thanks