http://bugs.winehq.org/show_bug.cgi?id=15203
--- Comment #4 from Dmitry Timoshkov dmitry@codeweavers.com 2008-09-10 09:44:10 --- (In reply to comment #3)
From what I have read on the subject the proper keysym for the right alt in keyboard layouts with altGr functionality (such as the one I use) is either Mode_switch (0xff7e) or ISO_Level3_Shift (0xfe03), depending on the X version; the previous (7.10) version of Ubuntu apparently used Mode_switch, whereas the current one (8.04) uses ISO_Level3_Shift.
Neither Mode_switch nor ISO_Level3_Shift are guaranteed to be generated by pressing Right Alt, in fact, it's all keyboard mapping dependent.