Argon Remote custom command

I’m working on a custom digital signage project to be mass produce using Argon one v2 with the remote control and I was wondering how can I launch a custom command using the remote? I need an example and the location of the script listening the the IR remote signal.