Signed-off-by: Derek Lesho dlesho@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 */