[PATCH 2/4] winemac: Set the scan code prefix when necessary.
Derek Lesho
dlesho at codeweavers.com
Mon Nov 11 11:41:10 CST 2019
Signed-off-by: Derek Lesho <dlesho at codeweavers.com>
---
dlls/winemac.drv/keyboard.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/dlls/winemac.drv/keyboard.c b/dlls/winemac.drv/keyboard.c
index aed4ff0d6e..b1f8d1cba5 100644
--- a/dlls/winemac.drv/keyboard.c
+++ b/dlls/winemac.drv/keyboard.c
@@ -1367,7 +1367,7 @@ BOOL CDECL macdrv_GetKeyboardLayoutName(LPWSTR name)
UINT CDECL macdrv_MapVirtualKeyEx(UINT wCode, UINT wMapType, HKL hkl)
{
struct macdrv_thread_data *thread_data = macdrv_init_thread_data();
- UINT ret = 0;
+ UINT ret = 0, prefix = 0;
int keyc;
TRACE("wCode=0x%x, wMapType=%d, hkl %p\n", wCode, wMapType, hkl);
@@ -1392,6 +1392,13 @@ UINT CDECL macdrv_MapVirtualKeyEx(UINT wCode, UINT wMapType, HKL hkl)
break;
}
}
+
+ /* set scan code prefix */
+ if (wCode == VK_RCONTROL || wCode == VK_RMENU)
+ prefix = 0xE0;
+
+ if (wMapType == MAPVK_VK_TO_VSC_EX)
+ ret |= ((prefix << 8) & 0xFF00);
break;
case MAPVK_VSC_TO_VK: /* scan-code to vkey-code */
--
2.23.0
More information about the wine-devel
mailing list