Topic: Autocomplete and submit with ENTER

I have the following code. As You can see, I'm using jquery autocomplete with catcomplete widget.
The issue is that I'd like to submit the form when hit ENTER key:

$(document).ready(function(){
  
  $('input[data-autocomplete]').live('focus', function(i){
    $(this).catcomplete({    
      delay: 500,      
      source: $(this).attr('data-autocomplete'),
      select: function(event, ui) {
        $(this).val(ui.item.value);
        if ($(this).attr('id_element')) {
          $($(this).attr('id_element')).val(ui.item.id);
          $($(this).attr('id_hidden_element')).val(ui.item.id);
        }
        return false;
      }
    });
  });
  
  $.widget("custom.catcomplete", $.ui.autocomplete, {
    _renderMenu: function( ul, items ) {
      var self = this,
      currentCategory = "";
      $.each( items, function( index, item ) {
        if ( item.category != currentCategory ) {
          ul.append( "<li class='category'>" + item.category + "</li>" );
          currentCategory = item.category;
        }
        self._renderItem( ul, item );
      });
    }
  });
});

I tried this simple solution, but no luck - I don't know how to implement it properly in my case: http://forum.jquery.com/topic/autocompl … -enter-key

Thank You for help.