Recognize a bang inside a gen codebox

Anthony Henderson's icon

Can anyone recommend a way to detect a bang coming into a codebox from a gen (not gen~) patcher? I'd like to call a function in a codebox when the bang occurs, but I didn't see a way to do this in the documentation. Is this even possible?