mirror of
https://github.com/Llewellynvdm/nativefier.git
synced 2024-11-15 17:27:08 +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>
57 lines
827 B
Plaintext
57 lines
827 B
Plaintext
# OSX
|
|
.DS_Store
|
|
|
|
# Node.js
|
|
package-lock.json
|
|
|
|
# ignore compiled lib files
|
|
lib*
|
|
app/lib/*
|
|
app/dist/*
|
|
built-tests
|
|
|
|
# commit a placeholder to keep the app/lib directory
|
|
!app/lib/.placeholder
|
|
|
|
dist
|
|
|
|
# Logs
|
|
logs
|
|
*.log
|
|
npm-debug.log*
|
|
|
|
# Runtime data
|
|
pids
|
|
*.pid
|
|
*.seed
|
|
|
|
# Directory for instrumented libs generated by jscoverage/JSCover
|
|
lib-cov
|
|
|
|
# Coverage directory used by tools like istanbul
|
|
coverage
|
|
|
|
# Grunt intermediate storage (http://gruntjs.com/creating-plugins#storing-task-files)
|
|
.grunt
|
|
|
|
# node-waf configuration
|
|
.lock-wscript
|
|
|
|
# Compiled binary addons (http://nodejs.org/api/addons.html)
|
|
build/Release
|
|
|
|
# Dependency directory
|
|
# https://docs.npmjs.com/misc/faq#should-i-check-my-node-modules-folder-into-git
|
|
node_modules
|
|
|
|
# IntelliJ project files
|
|
.idea
|
|
*.iml
|
|
out
|
|
gen
|
|
|
|
# Builds when testing npm pack
|
|
nativefier*.tgz
|
|
|
|
.vscode
|