Synthesizes a low-level keyboard event on the local machine.
- macOS 10.0–10.6Deprecated
- Mac Catalyst 13.0–13.0Deprecated
- Core Graphics
The value of the character to generate, or 0 to specify that the system should guess an appropriate value based on the default key mapping.
The virtual key code for the event. See
trueto specify that the key position is down; otherwise, pass
A result code. See the result codes described in Quartz Display Services.
This function is not recommended for general use because of undocumented special cases and undesirable side effects. The recommended replacement for this function is
CGEvent, which allows you to create a keyboard event and customize the event before posting it to the event system.