NOTE: I have checked other solutions, but they differ in the principle that they offer customization of mouse buttons and add different functions to them, whereas I only want the buttons to be recognized properly.
E.g. I want left click to be mouse1 (but that works), right click to be mouse 2, middle mouse3, G4 to be mouse4, G5 to be mouse5 and so on.
Atm. G5 is recognized as mouse8, G4 as mouse9 and G7 and G6 are both recognized as Control_L, so I can't even use them.
You can use Logitech-Gaming-Software. I'm brazil so I can't use the latest version (? occurs this error) but downloading the version an older version all goes right.