Creates event builder for provided event key.
433463
public static Event.Builder create(@NonNull String eventKey) {
        return new Event.Builder(dispatcher, eventKey);
    }
306349
function createKeyboardEvent(type, options) {
  options = clean(type, options);
  var e = document.createEvent('KeyboardEvent');
  (e.initKeyEvent || e.initKeyboardEvent).call(
    e,
    type,
    options.bubbles,
    options.cancelable,
    options.view,
    options.ctrl,
    options.alt,
    options.shift,
    options.meta,
    options.key,
    options.key
  );

  // http://stackoverflow.com/a/10520017
  if (e.keyCode !== options.key) {
    Object.defineProperty(e, 'keyCode', {
      get: function() { return options.key; }
    });
    Object.defineProperty(e, 'charCode', {
      get: function() { return options.key; }
    });
    Object.defineProperty(e, 'which', {
      get: function() { return options.key; }
    });
    Object.defineProperty(e, 'shiftKey', {
      get: function() { return options.shift; }
    });
  }

  return e;
}
886257
def add_event(self, key, event):
        """"""
        assert isinstance(key, str)
        assert isinstance(event, bytes)
        if all([char.isalnum() or char == '-' for char in key]):
            safe_key = key
        else:
            raise ValueError("Key must be alphanumeric or a dash (-):"
                             " {0}".format(key))
        safe_event = base64.encodestring(event).decode().strip()
        data = "{0}\t{1}\n".format(safe_key, safe_event)

        # Important to make a single atomic write here
        self._hasher.update(data.encode())
        self.f.write(data)
1129083
function (key, cb) {

            _util.buildQuery('events', {event_key: key}, function (error, data) {

                return cb(error, data);

            });

        }
750317
public Actions keyUp(CharSequence key) {
    if (isBuildingActions()) {
      action.addAction(new KeyUpAction(jsonKeyboard, jsonMouse, asKeys(key)));
    }

    return addKeyAction(key, codePoint -> tick(defaultKeyboard.createKeyUp(codePoint)));
  }
372493
public DescriptionBuilder mapping(final String key, final String name) {
        mapping.put(key, name);
        return this;
    }
782039
void addNewKey(Object key)
    {
        ensureRoom(buildKeyPosition + 1);
        buildKeys[buildKeyPosition++] = updateFunction.apply(key);
    }
657247
public EventBuilder withTag(String tagKey, String tagValue) {
        event.getTags().put(tagKey, tagValue);
        return this;
    }
105892
public <A,R> void listen(Class<A> key, Event<A,R> value) {
		map.wire(key, value);
	}
1245254
private void configureEvent(CacheEntryListenerInvocation listenerInvocation,
                               EventImpl<K, V> e, K key, V value, boolean pre, InvocationContext ctx) {
      e.setPre(pre);
      e.setKey(convertKey(listenerInvocation, key));
      e.setValue(convertValue(listenerInvocation, value));
      e.setOriginLocal(ctx.isOriginLocal());
      setTx(ctx, e);
   }
1116008
function createEvent(params, cb) {
  params.resourcePath = config.addURIParams(constants.EVENTS_BASE_PATH, params);
  params.method = 'POST';
  params.data = params.data || {};
  mbaasRequest.admin(params, cb);
}
1373657
function () {

	Menu.superclass.initEvents.call(this);

    // Create custom events

	var i = EVENT_TYPES.length - 1,
		aEventData,
		oCustomEvent;


	do {

		aEventData = EVENT_TYPES[i];

		oCustomEvent = this.createEvent(aEventData[1]);
		oCustomEvent.signature = CustomEvent.LIST;
		
		this[aEventData[0]] = oCustomEvent;

	}
	while (i--);

}
1334921
public final static PipeConnectionEvent build(AbstractPipe source, EventType type, IConsumer consumer, Map<String, Object> paramMap) {
        return new PipeConnectionEvent(source, type, consumer, paramMap);
    }
904532
public static Integer getKeyEvent(String key) throws NoSuchElementException
	{
		key = key.toUpperCase();
		Integer _result = theKeyTable.get(key);
		if (null == _result)
		{
			throw new NoSuchElementException(key);
		}
		return (_result);
	}
1361848
function createEventSource(webhook, options)
{
  var self = this

  var eventSource = new EventSource(webhook, options)

  eventSource.addEventListener('open', this.emit.bind(this, 'open', webhook))
  eventSource.addEventListener('message', function(message)
  {
    self.push(message.data)
  })

  return eventSource
}
1016972
function createIeEvent(type, options) {
  options = clean(type, options);
  var e = document.createEventObject();
  e.altKey = options.alt;
  e.bubbles = options.bubbles;
  e.button = options.button;
  e.cancelable = options.cancelable;
  e.clientX = options.clientX;
  e.clientY = options.clientY;
  e.ctrlKey = options.ctrl;
  e.detail = options.detail;
  e.metaKey = options.meta;
  e.screenX = options.screenX;
  e.screenY = options.screenY;
  e.shiftKey = options.shift;
  e.keyCode = options.key;
  e.charCode = options.key;
  e.view = options.view;
  return e;
}
866777
def Create(self, parent, id, evtHandler):
        

        style = wx.TE_MULTILINE
        self._tc = wx.TextCtrl(parent, id, "", style=style)

        # Disable if cell is clocked, enable if cell is not locked
        grid = self.main_window.grid
        key = grid.actions.cursor
        locked = grid.code_array.cell_attributes[key]["locked"] or \
            grid.code_array.cell_attributes[key]["button_cell"]
        self._tc.Enable(not locked)
        self._tc.Show(not locked)

        if locked:
            grid.code_array.result_cache.clear()
            self._execute_cell_code(key[0], key[1], grid)

        self._tc.SetInsertionPoint(0)
        self.SetControl(self._tc)

        if evtHandler:
            self._tc.PushEventHandler(evtHandler)