allow spaces in mentions

Reworked the trigger char detection to allow spaces.  Required some
different rules for menus appear and disappear.