I hope my query is acceptable for this forum. In Openbox, I have set up my keyboard to use the XF86Audio keys via .config/polybar/rc.xml, and they work just fine. In DWM I have done the same in the config.h as per the DWM advice and at first they work fine. However, after waking from a display/computer sleep they stop working. I won’t burden you with the code requirements because the code is obviously correct since everything works correctly at first and on restarting the computer.
I think I’ve found the solution. DWM doesn’t recognise the XF86audio keys on wake from sleep, so I rewrote the DWM config.h to use F9, F11, F12. If anyone knows how to get DWM to recognise the XF86audio keys after sleep, I would be grateful.