Check and request macOS accessibility permissions.
Requires macOS 10.12 or later. macOS 10.13 or earlier needs to download the Swift runtime support libraries.
$ npm install macos-accessibility-permissions
const hasPermissions = require('macos-accessibility-permissions');
hasPermissions()
// false
hasPermissions({ask: true})
// false
// After enabling permissions
hasPermissions()
// true
Returns true
if the permissions are granted, and false
otherwise. Optionally provide a hasAsked
parameter to trigger the accessibility dialog
- mac-focus-window - Focus a window and bring it to the front on macOS
- mac-windows - Provide Information about Application Windows running
MIT