Small markup extension to handle events with commands