At the USB HID level, AltGr is merely the right Alt key; the interpretation is just host software.
If a keyboard physically has two keys labelled ‘Alt’ and two labelled ‘AltGr’, then at the protocol level both ‘Alt’s are (indistinguishably) USB LeftAlt and both ‘AltGr’s are USB RightAlt.
(Mac keyboards' ‘Option’ is the label for USB Alt and acts like Windows' AltGr.)
If a keyboard physically has two keys labelled ‘Alt’ and two labelled ‘AltGr’, then at the protocol level both ‘Alt’s are (indistinguishably) USB LeftAlt and both ‘AltGr’s are USB RightAlt.
(Mac keyboards' ‘Option’ is the label for USB Alt and acts like Windows' AltGr.)