http://bugs.winehq.org/show_bug.cgi?id=15203
--- Comment #3 from Fábio Capela fabio.capela@yahoo.com 2008-09-10 09:35:32 --- (In reply to comment #2)
This sounds like a bug in Ubuntu keyboard layout. Right alt should generate XK_Alt_R (0xffea) keysym. Have you tried to report this to Ubuntu devs?
I haven't reported it to the Ubuntu devs, specially since I'm not sure it's a bug in their keyboard layouts.
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.
Mode_switch is handled, at least partially, in Wine (it is given the same scancode as XK_Alt_R in the array nonchar_key_scan, although it doesn't have an associated VK in nonchar_key_vkey), but ISO_Level3_Shift is not.
BTW, I'll continue looking for info on this (I don't know where to find authoritative information on the subject), but from posts in the xkb@listserv.bat.ru list going back as far as 2004 I've got the feeling that binding Mode_switch to the right alt key is deprecated and should be replaced with ISO_Level3_Shift.