jkbrzt / macos-fn-toggle

A macOS app to quickly toggle the behavior of the fn key.
https://twitter.com/jakubroztocil
MIT License
231 stars 30 forks source link

not working in macOS Sierra #7

Closed kevindashgit closed 1 year ago

kevindashgit commented 6 years ago

OSX v10.12.6

Probably this is assumed w/ the fancy new touch bar and the complexity it introduces - but a fn key toggle would be AWESOME for my workflow!

Any known workarounds?

biocross commented 6 years ago

It seems to be working for me. What exactly is the issue you're facing? It's even working on High Sierra for me.

kevindashgit commented 6 years ago

When I attempt to run it I get the error (in a dialog window) The action "Run AppleScript" encountered an error.

biocross commented 6 years ago

Oh I got this too when I upgraded to Sierra. Just delete the current binary you have, re-download and follow the installation steps again, it'll start working.

kevindashgit commented 6 years ago

hmmm - I tried this but no luck.

git pull && make clean && make install && ./fn-toggle.app/Contents/MacOS/Application\ Stub

yields both the error dialog mentioned above along w/ the following output in stdout:

2017-10-02 13:02:42.974 Application Stub[78836:2812651] Cache file at /System/Library/Caches/com.apple.automator.actionCache-system-readonly.plist is not valid: System Languages have changed.
2017-10-02 13:02:42.974 Application Stub[78836:2812651] Failed to use read-only system cache from installer at /System/Library/Caches/com.apple.automator.actionCache-system-readonly.plist.
kevindashgit commented 6 years ago

Actually . - now that I look more closely at the automator script - the Keyboard pane of System Preferences no longer contains a checkbox that allows default usage of F1, F2, etc Keys - so default selecting the first checkbox wouldn't do the trick. In fact, it should have checked Adjust keyboard brightness in low light but for whatever reason this doesn't happen.

kevindashgit commented 6 years ago

In the end - I found this to be a solution that better suited my needs: https://www.imore.com/how-make-function-keys-default-touch-bar-display

As its application specific and not system wide - which is super ideal IMO.

sthodup1 commented 6 years ago

Here's a fix:

sthodup1 commented 6 years ago

tell application "System Preferences" reveal anchor "keyboardTab" of pane "com.apple.preference.keyboard" end tell

tell application "System Events" to tell process "System Preferences" repeat until exists tab group 1 of window 1 end repeat click checkbox 1 of tab group 1 of window 1 end tell

quit application "System Preferences"

sthodup1 commented 6 years ago

Also make sure to give fn-toggle accessibility access

jkbrzt commented 1 year ago

master updated to work with Ventura