MapVirtualKey doesn't distinguish between left and right keys onXP/2000

  • Thread starter Thread starter RL
  • Start date Start date
R

RL

Hi,

I have following function call in my C# program:

Keys virtualKey = (Keys)Win32Api.MapVirtualKey(0xe038,
3);

-> Win32Api is my own wrapper around the MapVirtualKey API function.
-> My current keyboard layout is Swiss German.
-> 0xe038 is the scancode for the Right Alt key
-> The last parameter value 3 represents MAPVK_VSC_TO_VK_EX
Windows NT/2000/XP: uCode is a scan code and is translated into a
virtual-key code that distinguishes between
left- and right-hand keys. If there is no translation, the
function returns 0.

On Vista virtualKey returns Keys.RMenu which is correct

On XP/2000 it returns None.

Why is it behaving wrong on XP/2000?

Thanks for your help.

Reto
 
Back
Top