winex11.drv: Use symbolic names for MapVirtualKey translation types.
This commit is contained in:
parent
aa649542e2
commit
3407307a50
|
@ -2094,25 +2094,32 @@ UINT X11DRV_MapVirtualKeyEx(UINT wCode, UINT wMapType, HKL hkl)
|
|||
FIXME("keyboard layout %p is not supported\n", hkl);
|
||||
|
||||
switch(wMapType) {
|
||||
case 0: { /* vkey-code to scan-code */
|
||||
case MAPVK_VK_TO_VSC: /* vkey-code to scan-code */
|
||||
case MAPVK_VK_TO_VSC_EX: /* FIXME: should differentiate between
|
||||
left and right keys */
|
||||
{
|
||||
/* let's do vkey -> keycode -> scan */
|
||||
int keyc;
|
||||
for (keyc=min_keycode; keyc<=max_keycode; keyc++)
|
||||
if ((keyc2vkey[keyc] & 0xFF) == wCode)
|
||||
returnMVK (keyc2scan[keyc] & 0xFF);
|
||||
TRACE("returning no scan-code.\n");
|
||||
return 0; }
|
||||
|
||||
case 1: { /* scan-code to vkey-code */
|
||||
return 0;
|
||||
}
|
||||
case MAPVK_VSC_TO_VK: /* scan-code to vkey-code */
|
||||
case MAPVK_VSC_TO_VK_EX: /* FIXME: should differentiate between
|
||||
left and right keys */
|
||||
{
|
||||
/* let's do scan -> keycode -> vkey */
|
||||
int keyc;
|
||||
for (keyc=min_keycode; keyc<=max_keycode; keyc++)
|
||||
if ((keyc2scan[keyc] & 0xFF) == (wCode & 0xFF))
|
||||
returnMVK (keyc2vkey[keyc] & 0xFF);
|
||||
TRACE("returning no vkey-code.\n");
|
||||
return 0; }
|
||||
|
||||
case 2: { /* vkey-code to unshifted ANSI code */
|
||||
return 0;
|
||||
}
|
||||
case MAPVK_VK_TO_CHAR: /* vkey-code to unshifted ANSI code */
|
||||
{
|
||||
/* we still don't know what "unshifted" means. in windows VK_W (0x57)
|
||||
* returns 0x57, which is upercase 'W'. So we have to return the uppercase
|
||||
* key.. Looks like something is wrong with the MS docs?
|
||||
|
@ -2170,14 +2177,8 @@ UINT X11DRV_MapVirtualKeyEx(UINT wCode, UINT wMapType, HKL hkl)
|
|||
wine_tsx11_unlock();
|
||||
return 0;
|
||||
}
|
||||
|
||||
case 3: /* **NT only** scan-code to vkey-code but distinguish between */
|
||||
/* left and right */
|
||||
FIXME(" stub for NT\n");
|
||||
return 0;
|
||||
|
||||
default: /* reserved */
|
||||
WARN("Unknown wMapType %d !\n", wMapType);
|
||||
FIXME("Unknown wMapType %d !\n", wMapType);
|
||||
return 0;
|
||||
}
|
||||
return 0;
|
||||
|
|
|
@ -3729,6 +3729,13 @@ typedef struct tagCOMPAREITEMSTRUCT
|
|||
#define VK_PA1 0xFD
|
||||
#define VK_OEM_CLEAR 0xFE
|
||||
|
||||
/* MapVirtualKey translation types */
|
||||
#define MAPVK_VK_TO_VSC 0
|
||||
#define MAPVK_VSC_TO_VK 1
|
||||
#define MAPVK_VK_TO_CHAR 2
|
||||
#define MAPVK_VSC_TO_VK_EX 3
|
||||
#define MAPVK_VK_TO_VSC_EX 4
|
||||
|
||||
/* Key status flags for mouse events */
|
||||
#define MK_LBUTTON 0x0001
|
||||
#define MK_RBUTTON 0x0002
|
||||
|
|
Loading…
Reference in New Issue