Keyboard Emulation hold key

So I'm new at arduino & coding. I have a keypad matrix and a keyboard emulation on chipset 32u4.

The issue is that when I press one key and hold it down, I only get one character. Instead of a bunch of characters until I stop pressing the key.

I've tried to use t_hold but I couldn't get it to work.

Any help would be great.

#include <Keypad.h>
#include <Keyboard.h>

const byte ROWS = 7; //four rows
const byte COLS = 6; //four columns
//define the cymbols on the buttons of the keypads
char hexaKeys[ROWS][COLS] = {

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

byte rowPins[ROWS] = {6, 5, 4, 3, 2, 1, 0}; //connect to the row pinouts of the keypad
byte colPins[COLS] = {16, 15, 14, 9, 8, 7}; //connect to the column pinouts of the keypad

//initialize an instance of class NewKeypad
Keypad customKeypad = Keypad( makeKeymap(hexaKeys), rowPins, colPins, ROWS, COLS);

void setup(){

Serial.begin(9600);
}

void loop(){
char customKey = customKeypad.getKey(); //figure out which key

if(customKey == 'y') {
Keyboard.press(8); //8 is ASCII code for backspace
delay(100);
Keyboard.releaseAll();
} else if(customKey == 'o'){
Keyboard.press(' ');
delay(100);
Keyboard.releaseAll();
}else if(customKey) {
Keyboard.press(customKey);
delay(100);
Keyboard.releaseAll();
delay(10);

}

}

keyboard.txt (1.38 KB)

Please enclose code in Code Tags </>.

I suspect several problems. Keypdad.getKey() might wait until the key is released. Are there more methods for reading asynchronous key states?

The delay() will block any other code, so that an auto repeat cannot work. And releaseAll() will terminate auto repeat.