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

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top