I copied someone else's button matrix code and adapted it for the 5x15 keyboard I built. There's a pretty major flaw in it for my purposes, as I can't assign anything other than single characters that can be printed to the matrix. How can I modify this array so that I can add things like "KEY_LEFT_SHIFT" or other custom functions that do things like adjusting adjusting my LED brightness??

Code:
#include <Keyboard.h>

int longPressDelay = 350;           //customizable encoderValues
int spamSpeed = 15;

byte inputs[] = {23,22,21,20,19,18,17,16,15,14,39,38,37,36,35};          //declaring inputs and outputs
const int inCount = sizeof(inputs)/sizeof(inputs[0]);
byte outputs[] = {28, 29, 30, 31, 32};
const int outCount = sizeof(outputs)/sizeof(outputs[0]);

char layout[outCount][inCount] = {
  {' ','1','2','3','4','5','6','7','8','9','0','-','=',' ',' '},
  {' ','q','w','e','r','t','y','u','i','o','p','[',']',' ',' '},
  {' ','a','s','d','f','g','h','j','k','l',';',' ',' ',' ',' '},
  {' ','z','x','c','v','b','n','m',',','.','/',' ',' ',' ',' '},
  {' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' '},
};

int keyDown[outCount][inCount];
bool keyLong[outCount][inCount];

void setup(){
  
  for(int i=0; i<outCount; i++){    //declaring all the outputs and setting them high
    pinMode(outputs[i],OUTPUT);
    digitalWrite(outputs[i],HIGH);
  }
  for(int i=0; i<inCount; i++){     //declaring all the inputs and activating the internal pullup resistor
    pinMode(inputs[i],INPUT_PULLUP);
  }
  
  Serial.begin(9600);               //establishing Serial link and initializing keyboard
  Serial.println("Connected");
  Keyboard.begin();
}

//Main loop going through all the keys, then waiting 0.5ms
void loop() {
  for (int i=0; i<5; i++)
  {    
    digitalWrite(outputs[i],LOW);   //setting one row low
    delayMicroseconds(5);           //giving electronics time to settle down
    
    for(int j=0; j<15; j++)
    {
      if(digitalRead(inputs[j]) == LOW)
      {
        keyPressed(i,j);            //calling keyPressed function if one of the inputs reads low
      }
      else if(keyDown[i][j] != 0)   //resetting the key if it is not pressed any more
      {  
        resetKey(i,j);
      }
    }
    
    digitalWrite(outputs[i],HIGH);
    delayMicroseconds(500);         //setting the row high and waiting 0.5ms until next cycle
  }
}

//if a key is pressed, this Funtion is called and outputs to serial the key location, it also sends the keystroke if not already done so
void keyPressed(int row, int col){
  Serial.print("Output: "); 
  Serial.print(row);
  Serial.print(" Input: ");
  Serial.print(col);
  Serial.print(" ");
  Serial.println(layout[row][col]);

  if(keyDown[row][col]==0){         //if the function is called for the first time for this key
    Keyboard.write(layout[row][col]);
  }
  else if(keyLong[row][col] && keyDown[row][col] > spamSpeed){ //if the key has been held long enough to warrant another keystroke set
    Keyboard.write(layout[row][col]);
    keyDown[row][col] = 1;
  }
  else if(keyDown[row][col] > longPressDelay){ //if the key has been held for longer that longPressDelay, it switches into spam mode
    keyLong[row][col] = true;
  }

  keyDown[row][col]++;
}

void resetKey(int row, int col){ //resetting the variables after key is released
  keyDown[row][col] = 0;
  keyLong[row][col] = false;
}