Function

CGEventTapPostEvent

Posts a Quartz event from an event tap into the event stream.

Declaration

void CGEventTapPostEvent(CGEventTapProxy proxy, CGEventRef event);

Parameters

proxy

A proxy that identifies the event tap posting the event. Your event tap callback function is passed this proxy when it is invoked.

event

The event to post.

Discussion

You can use this function to post a new event at the same point to which an event returned from an event tap callback function would be posted. The new event enters the system before the event returned by the callback enters the system. Events posted into the system will be seen by all taps placed after the tap posting the event.

See Also

Working With Event Taps

CGEventTapCreate

Creates an event tap.

CGEventTapCreateForPSN

Creates an event tap for a specified process.

CGEventTapEnable

Enables or disables an event tap.

CGEventTapIsEnabled

Returns a Boolean value indicating whether an event tap is enabled.

CGEventPost

Posts a Quartz event into the event stream at a specified location.

CGEventPostToPSN

Posts a Quartz event into the event stream for a specific application.

CGGetEventTapList

Gets a list of currently installed event taps.

CGEventMaskBit

Generates an event mask for a single type of event.