code: function(keyEvent, geocoder){
      //pass invalid event
      if (!keyEvent.key) return;
      // don't send events for keys that don't change the input
      // TAB, ESC, LEFT, RIGHT, ENTER, UP, DOWN
      if (keyEvent.metaKey || [9, 27, 37, 39, 13, 38, 40].indexOf(keyEvent.keyCode) !== -1) return;
      var payload = this.getEventPayload('search.keystroke', geocoder);
      payload.lastAction = keyEvent.key;
      if (!payload.queryString) return; // will be rejected
      return this.push(payload);
    }
docs: Send a search-keyevent event to the mapbox events service
  This event records each keypress in sequence
  @private
  @param {Object} keyEvent the keydown event to log
  @param {Obeject} geocoder a mapbox-gl-geocoder instance