Turns off local hardware events in the current session.
- macOS 10.0–10.6Deprecated
- Mac Catalyst 13.0–13.0Deprecated
- Core Graphics
trueto specify that local hardware events on the remote system should be inhibited; otherwise, pass
A result code. See the result codes described in Quartz Display Services.
This function is typically used during remote operation of a system to disconnect the keyboard and mouse for a short period of time, as in automated system testing or telecommuting applications.
CGInhibit function is not recommended for general use because of undocumented special cases and undesirable side effects. For example, this function can permanently disable the keyboard and mouse, rendering the system unusable. The recommended replacement for this function is
In OS X v10.2 and earlier, this function inhibits local events only after a synthetic keyboard or mouse event is posted by the calling application. In macOS 10.3 and later, event inhibition takes effect immediately. If your application terminates for any reason, event inhibition on the remote system is immediately turned off.