fn-toggle.app programmatically toggles the
"Use all F1, F2, etc. keys as standard function keys"
option in macOS System Preferences. A task that is tedious
when done manually, which especially keyboard-heavy users,
such as programmers, tend to do very often.
Run make install which installs the following files:
/Applications/fn-toggle.app — the app containing the script that toggles
the setting.
~/Library/Services/fn-toggle.workflow — a service that allows
fn-toggle.app to be invoked with a keyboard shortcut.
(You can run make clean to remove those files again.)
In OS X 10.9 (Mavericks) and later, you also need to:
Open the fn-toggle app once either from spotlight or from Applications
folder (it will do nothing but it's needed for the app to appear in the
accessibility menu in step 3)
Go to System Preferences > Security & Privacy > Accessibility >
Privacy
Click the lock to make changes and tick fn-toggle.app under
Allow the apps below to control your computer.
Usage
Run the app. The fastest way to do it is from Spotlight:
Press ⌘ + space (or similar) to open Spotlight.
Type fn, fn-toggle.app should be the Top Hit.
Hit Enter.
Enable Keyboard shortcut
Go to System Preferences > Keyboard > Shortcuts > Services > General
(at the end of the list) and assign a new shortcut to fn-toggle service
https://github.com/Pyroh/Fluor — a really nice menubar application that allows you to automatically change the behaviour of the keyboard's fn keys depending on the active application.
请发表评论