I actually use F6 on a daily basis for Do Not Disturb and Shift-F6 for Sleep. If I were to set this up I'd use F4, F5 because I don't use dictation and Spotlight already has a shortcut with CMD+Space.
I am currently using Karabiner-Elements to do this but this seems cleaner. My need, though, is to remap to F3 and F4. As a non-coder, looking at the script, I am not able to easily determine to what I need to change (I assume) the Dst identifier for each key (0xFF00000009 and 0xFF00000008) Do I just go down two numbers on each (0xFF00000007 and 0xFF00000006), as they are two keys below F5 and F6? Or does each key have its own completely different identifier? Or am I totally on the wrong track? Appreciate any help.