handle keypress for typeahead search widget