I found @oa-'s answer useful. I used their script as posted in the answer.
1. Save as an Application: Script Editor > File > Export… > File Format: Application
2. Check "Stay open after run handler"
3. Run the app or add it to your login items: System Preferences > Users & Groups > User > Login Items > Press the "+" button
tell application "System Events" to keystroke (key code 63) -- press fn key
However it adds the applescript application to switcher which is an annoyance to me. To remove the script from the
Cmd+Tab switcher, find the applescript application and edit its
Info.plist file (right click the app file ->
Show Package Contents, open
Info.plist with text editor). You should add
to it so it becomes hidden from app switcher. If you want to trace & kill the app later, use the terminal to hunt it down:
ps aux | grep YOUR_SCRIPT_NAME and
Used for assistance: https://apple.stackexchange.com/a/92017/123820