How to hit enter after a scanner inputs a set of numbers?

Hello, I’m using LibreOffice Calc on a Raspberry Pi (I doubt that it matters), and I was wondering if there is a macro that I can use that can tie in with the scanner. When I use the scanner and scan an ID It outputs a set of numbers (Which is what I want) and I want to create a macro that gives the time when that input is scanned and also hits return so It can scan another ID.

Here’s the order of what I want it to do

  1. Scan ID
  2. On the row to the right print the time and date
  3. Hit enter so it can run over and over again

Anything will help, I am new to this and need help quickly!!

Thanks,
Nick