I recently got a new bluetooth keyboard that works fine, except for the Media keys. All of the keys in the f# row are acting as f1-f12 keys, regardless of whether the fn key is pressed or not. Is there a way to fix this? Or is that not possible, since fn/media keys are managed within the keyboard? If not, is there a way (through autoHotkey or something) to use another key (like ALT) combined with the f# keys to give the same result as the media key would have had?
The Fn key is likely handled by the keyboard itself and therefore cannot be remapped.
While it is most common for the Fn key processing to happen directly in the keyboard micro-controller, offering no knowledge to the main computer of whether the Fn key was pressed, some manufacturers, like Lenovo, perform this mapping in BIOS running on the main CPU, allowing remapping the Fn key by modifying the BIOS interrupt handler.
AutoHotkey, as you suggested, would work as a workaround. You would need to manually create a rule for each key (that has a Fn+key value). Keep in mind that many Windows applications use Alt+Function key keyboard shortcuts (for example Alt+F4 to quit a program).