The G510 media keys should work like a standard keyboard's when there is no headset plugged in. When a headset is plugged in, the G510 restarts, and the keyboard audio controls will work with the system like the audio controls on a USB headset (see answer 360023247754).
On some operating systems, like Windows 7, headset audio controls only control the volume levels on the headset itself. The G510's audio controls will only change the volume of the device plugged into the G510 on these operating systems. To enable the keyboard's media keys to work for all devices, simply disconnect your headset from the G510's audio ports.