A while back, in my OS preferences I set F3 to open my text editor.
However, individual OS apps can intercept function keys and perform behavior with them instead. This means my shortcut only worked in apps that didn’t bind F3, or in Finder.
I experimented with Karabiner and other apps, got tired of looking into keybindings, and did other things.
Today, a little improvement:
Now, after I switch to my editor with F3, pressing F3 again runs custom code which opens Firefox, and turns on the Wifi if it’s off.