Keyboard.print('\n') problem - does not print in one line...

Hello,

I have some code that dumps the UUID (serial number) of RFID NFC tag, and than I'm sending it to HID keyboard using Keyboard.print function.

But now i need to add "enter" at the end of output.

So i figured out that i will add newline character, but the result is for example for 4 byte UUID that should give FFFFFFFF"enter"
gives:
FF
FF
FF
FF

So after every character it puts newline, how to fix it ?
I also tried Keyboard.println(); , but that does not do anything in the output (no enter)

void Keyboard_print_byte_array(byte *buffer, byte bufferSize) {
  for (byte i = 0; i < bufferSize; i++) {
       Keyboard.print(buffer[i] < 0x10 ? "0" : "");
       Keyboard.print(buffer[i], HEX);
       Keyboard.print('\n');
   }
}

Take keyboard.print('\n') out of the for loop and put it after the for loop

Thanks for fast answer, actually I was just going to post the answer by my self :D, late hour, and i just missed that solution at the first time.

cheers mate and have a good night, that solution works perfect:

void Keyboard_print_byte_array(byte *buffer, byte bufferSize) {
  for (byte i = 0; i < bufferSize; i++) {
       Keyboard.print(buffer[i] < 0x10 ? "0" : "");
       Keyboard.print(buffer[i], HEX);
   }
  
  Keyboard.print('\n');
}