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.)
Apart from the label, AltGr is identical to right hand Alt. The difference is all in software. For example, if you tell your computer you have a UK keyboard it will treat right hand Alt as AltGr.
German Keyboard. Yes, there is an AltGr key on my keyboard but I map that one to Control actually...
In fact I swap my Alt and Control keys, and don't use AltGr for its original intent at all, because using AltGr+7/8/9/0 on the German keyboard to type {[]} is horrible. I use an english layout (which I modified with my AltGr+j/k/l/i thing and a bunch of other tweaks) instead.