Use function keys as function keys when external keyboard connected

Hate toggling it in System Preferences twice a day!

is there a way to toggle this with a btt action yet? i also would love to have the F-keys active in an App (Resolve) but the multimedia buttons active in all the other apps. thanks!

I also would love to have such shortcut !!!