Make menu-opening event configurable