Is this thread/post maybe getting closer to what you want?
Basically, if you could publish all codes received into a sensor, then you could do further processing on the sensor?
Edit: More crazy examples…