@AtotehZ
Thank you - not a "key" that I use. And I am using Windows 10 - not Windows 7 so how my system behaves with respect to Alt Gr could be another factor.
On my desktop Alt Gr toogles a bar across the top of the browser window with File, Edit, View, History, Bookmarks, Tools, Help.
Trying to use any of the any of presented choices toggles off the bar, closes the browser, or sometimes apparently does nothing at all.
My left Alt key results in very much the same behavior.
Understood that the monitor goes black - could be some video function being toggled - media keys as you mentioned.
I still have the same question for OP:
@zak456
What behavior is being expected when Alt Gr and F4 are pressed and what, if anything, was done to configure that expected behavior?