http://bugs.winehq.org/show_bug.cgi?id=15203
--- Comment #6 from Fábio Capela fabio.capela@yahoo.com 2008-09-10 13:39:04 --- I was thinking about this problem and noticed that fixing the right alt key to always send a VK_RMENU inside wine would break the usage of altGr to input modified characters; in light of it, this behavior seems like merely an example of the different behaviors of Linux and Windows, and not a bug that can be fixed.
(Incidentally, I think this is the reason Mode_switch sends the right alt scancode, but not the right alt vkey; it would break altGr usage the same way. Maybe a comment inside keyboard.c explaining why this can not be fixed would be in order.)
At least now I know why my right alt was not working with wine, and can craft a custom keymap to fix it for the one program where this matters to me (World of Warcraft).