Resetting timer every time keypad is pressed

I am using the Timer1 library with a 3 x 4 keypad. There is a keypad timeout of 6 seconds
meaning that the display and numbers will reset if the user does not press any new
keys for 6 seconds. So, every time a digit is pressed, the
timer should reset so that the display does not reset before the keypad
timeout of 6 seconds. However, the timer does not restart correctly so the cycle of
6 seconds continues to run in the background whether or not keys are pressed, causing the
display to reset at unwanted times. How can the code be fixed to reset the timer
after each key is pressed?

#include <Keypad.h>
#include "Arduino.h"
#include <Adafruit_GFX.h>
#include <Adafruit_SSD1306.h>
#include <TimerOne.h>

#define OLED_RESET 4
#define SPACE  20
#define DELAY  300 // keypress delay
#define MESSAGE_DELAY 500 // message delay
#define TIMEOUT 6000000 // keypress timeout time (in microseconds)
#define MAXLENGTH 4 // maximimum no. of characters before the loop gives up and an error is declared

// the keypad is Adafruit 3x4 Matrix Keypad PRODUCT ID: 3845
// the processor is an Adafruit Feather 328P
/*
 * keypad     1   2       3       4       5       6       7      8       9
 *            nc  col 2   row1    col 1   row 4   col 3   row 3  row 2   nc      
 * Uno            pin 47  pin 3   pin 10  pin 9   pin 20  pin 8  pin 7 
 * Feather 328P   pin 4   pin 3   pin 2   pin 10  pin 9   pin 6  pin 5
 * 
 */

const byte ROWS = 4; //four rows
const byte COLS = 3; //three columns
char keys[ROWS][COLS] = {
  {'1','2','3'},
  {'4','5','6'},
  {'7','8','9'},
  {'*','0','#'}
};

byte rowPins[ROWS] = {3,5,6,10}; //connect to the row pinouts of the keypad
byte colPins[COLS] = {2,4,9}; //connect to the column pinouts of the keypad

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

const int led = LED_BUILTIN;  // the pin with a LED



void setup() {

  Timer1.initialize(TIMEOUT); // set keypress timeout interval
  Timer1.attachInterrupt(resetDisplay);
  
  Serial.begin(9600);
  display.begin(SSD1306_SWITCHCAPVCC, 0x3C); // Address 0x3C for 128x32

  // Intialized with an Adafruit splashscreen for 2 sec
  display.display();
  delay(2000);

  // Clear the buffer.
  display.clearDisplay();
  display.display();

  // text display settings
  display.setTextSize(3);
  display.setTextColor(WHITE);


  pinMode (led, OUTPUT);
}

// global variables
int n = 0;
int ledState = LOW;
String key_word;


void restartTimer() {
    Timer1.restart();
}

void loop() {

char key = keypad.getKey();

  if (key != NO_KEY){
    ledState = HIGH;
    key_word = key_word + key; //increment the key word character accumulator
    Timer1.detachInterrupt();
    restartTimer();
    
      if (n == 0 ){ // is it the first character?
        display.clearDisplay();
        display.setCursor(0,10);
      }
      else{      
        display.setCursor(n,10);
      }

    
    display.print(key);
    Serial.println(key_word);
    n = n + SPACE;
    delay(DELAY); // put in a little delay so the display is smooth

   
        }     
  
  if (n == MAXLENGTH*SPACE){
    Timer1.detachInterrupt(); // turn off the (timer) interrupts
    display.display(); // show the last digit
    delay(MESSAGE_DELAY); // smooth display
    display.clearDisplay();
    display.setCursor(0,10);
    display.print("Error");
    display.display();
    delay(MESSAGE_DELAY); // smooth display
    n = 0; // reset character counter if 6 characters have been printed
    key_word = NO_KEY; // clear key_word buffer
    Timer1.attachInterrupt(resetDisplay); // restart the interrupt timer
  }
 display.display(); //actually display whatever has been loaded
 Timer1.attachInterrupt(resetDisplay); // restart the interrupt time

}

void resetDisplay(){
  noInterrupts();
  blinkLED();
  display.clearDisplay();
  display.setCursor(0,10);
  Serial.println("reset");
  display.print(""); // clear the display
  n = 0; // reset character counter if 6 characters have been printed
  key_word = NO_KEY; // clear key_word buffer
  Timer1.attachInterrupt(resetDisplay);
  return;

}
void blinkLED(void)
{
  if (ledState == LOW) {
    ledState = HIGH;
  } 
  else {
    ledState = LOW;
  }
  digitalWrite(led, ledState);
}

Using a hardware timer is overkill here (unless you are learning about hardware timers, that is).
You can create your own timer like this:

uint32_t lastKeyPressAtMs;

Every time a key is pressed, you can refresh it:

lastKeyPressAtMs = millis() ;

Every loop iteration (or as required) you can test if it has expired and , if necessary, act on it:

if ( millis() - lastKeyPressAtMs > TIMEOUT) {
// clean out any part entered code etc.
}