title: How to get JQuery-UI autocomplete to submit on pressing enter while using categories from remote source?
body: <p>I'm using the following boiler plate code from the jqueryui site:
  <a href="http://jqueryui.com/autocomplete/#categories" rel="nofollow">http://jqueryui.com/autocomplete/#categories</a>
  <a href="http://jqueryui.com/autocomplete/#remote" rel="nofollow">http://jqueryui.com/autocomplete/#remote</a></p>
  
  <pre><code>$.widget("custom.catcomplete", $.ui.autocomplete, {
      _create: function() {
          this._super();
          this.widget().menu("option", "items", "&gt; :not(.ui-autocomplete-category)");
      },
      _renderMenu: function(ul, items) {
          var that = this,
              currentCategory = "";
          $.each(items, function(index, item) {
              var li;
              if (item.category != currentCategory) {
                  ul.append("&lt;li class='ui-autocomplete-category'&gt;" + item.category + "&lt;/li&gt;");
                  currentCategory = item.category;
              }
              li = that._renderItemData(ul, item);
              if (item.category) {
                  li.attr("aria-label", item.category + " : " + item.label);
              }
          });
      },
  });
  
  $(function() {
  
      $("#search").catcomplete({
          delay: 0,
          source: "search",
          select: function(event, ui) {
              ajax.get("/displayInfo", {
                  a: ui.item.value
              }, displayInfo, true);
          }
      });
  });
  </code></pre>
  
  <p>But how do I get the input trigger "select" even a user just presses enter ? Right now if you just press enter (without selecting anything from the drop down), the drop down disappears and nothing happens. But I wan't it to send whatever is in the drop down (even if it doesn't match) to /displayInfo.</p>
  
  <p>Any suggestions ?</p>