mirror of
https://github.com/Llewellynvdm/nativefier.git
synced 2024-11-10 15:21:03 +00:00
adcf21a3df
When setting a media key (play, pause, next/previous track) as global shortcut in Mac OS 10.14+, accessibility permissions must be given to the app for it to work (see https://www.electronjs.org/docs/api/global-shortcut?q=MediaPlayPause#globalshortcutregisteraccelerator-callback). This PR will accomplish the following on generated app launch: - Check if global shortcuts are being setup - Check if the host OS is Mac OS - Check if the global shortcuts were one of the media keys - If the above are true, check if the app has accessibility permissions - If the app does not have the accessibility permissions it will ask the user if they would like to be prompted for these permissions, and then ask Mac OS to prompt for accessibility permissions. ~~As well, a new command line flag is added (`--no-accessibility-prompt`) to preventatively suppress these prompts if desired.~~ Screenshots of the new behavior: ![Screen Shot 2021-02-26 at 2 41 21 PM](https://user-images.githubusercontent.com/547567/109356260-76bfde00-784e-11eb-8c36-3a51b911b780.png) ![Screen Shot 2021-02-26 at 2 41 28 PM](https://user-images.githubusercontent.com/547567/109356266-79223800-784e-11eb-94eb-66437c05fd10.png) ![Screen Shot 2021-02-26 at 2 41 50 PM](https://user-images.githubusercontent.com/547567/109356270-7aebfb80-784e-11eb-9e90-e09bb49752c6.png) Co-authored-by: Ronan Jouchet <ronan@jouchet.fr>
23 lines
275 B
Plaintext
23 lines
275 B
Plaintext
/*
|
|
!lib/
|
|
!icon-scripts
|
|
.DS_Store
|
|
src/
|
|
*eslintrc.js
|
|
*eslintrc.yml
|
|
*tsconfig.tsbuildinfo
|
|
*package-lock.json
|
|
*tsconfig.json
|
|
*jestSetupFiles*
|
|
*-test.js
|
|
*-test.js.map
|
|
*.test.d.ts
|
|
*.test.js
|
|
*.test.js.map
|
|
app/*
|
|
!app/lib/
|
|
!app/inject/
|
|
!app/nativefier.json
|
|
!app/package.json
|
|
.vscode/
|