I've a second USB keyboard, which is a numeric keypad.
I would like to record the key press in some kind of buffer or text file and process them until I press enter.
This is for a restaurant in which they use the main keyboard to enter orders and the extra keypad is for waiters to print tickets.
I've read in other answers questions/592829 that I can use actkbd for filtering keys of second keyboard and that I can disable the 2nd device input with xinput so keypad input does not go into active program.
The question is: how to do the buffer part?. Because I want the waiter to enter "1" or "23" as table number and only when pressing enter to send this buffer to a external command to print the ticket.