Add click/rclick hooks and count flags