Enables or disables the merging of actual key and mouse state with the application-specified state in a synthetic event.
- macOS 10.1–10.6Deprecated
- Mac Catalyst 13.0–13.0Deprecated
- Core Graphics
trueto specify that the actual key and mouse state are merged with the application-specified state in a synthetic event; otherwise, pass
A result code. See the result codes described in Quartz Display Services.
By default, the flags that indicate modifier key state (Command, Option, Shift, Control, and so on) from the system's keyboard and from other event sources are ORed together as an event is posted into the system, and current key and mouse button state is considered in generating new events. This function allows your application to enable or disable the merging of event state. When combining is turned off, the event state propagated in the events posted by your application reflect state built up only by your application. The state within your application’s generated event will not be combined with the system's current state, so the system-wide state reflecting key and mouse button state will remain unchanged. When called with
do equal to
false, this function initializes local (per application) state tracking information to a state of all keys, modifiers, and mouse buttons up. When called with
do equal to
true, the current global state of keys, modifiers, and mouse buttons are used in generating events.
This function is not recommended for general use because of undocumented special cases and undesirable side effects. The recommended replacement for this function is to use Quartz events and Quartz event sources. This allows you to control exactly which, if any, external event sources will contribute to the state used to create an event.