diff options
Diffstat (limited to 'xorg-server/hw/xwin/winkeybd.c')
-rw-r--r-- | xorg-server/hw/xwin/winkeybd.c | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/xorg-server/hw/xwin/winkeybd.c b/xorg-server/hw/xwin/winkeybd.c index 611ea5d55..5d0f58442 100644 --- a/xorg-server/hw/xwin/winkeybd.c +++ b/xorg-server/hw/xwin/winkeybd.c @@ -75,6 +75,20 @@ winTranslateKey (WPARAM wParam, LPARAM lParam, int *piScanCode) int iKeyFixupEx = g_iKeyMap[wParam * WIN_KEYMAP_COLS + 2]; int iParamScanCode = LOBYTE (HIWORD (lParam)); +/* WM_ key messages faked by Vista speech recognition (WSR) don't have a + * scan code. + * + * Vocola 3 (Rick Mohr's supplement to WSR) uses + * System.Windows.Forms.SendKeys.SendWait(), which appears always to give a + * scan code of 1 + */ + if (iParamScanCode <= 1) + { + iParamScanCode = MapVirtualKeyEx(wParam, + /*MAPVK_VK_TO_VSC*/0, + GetKeyboardLayout(0)); + } + /* Branch on special extended, special non-extended, or normal key */ if ((HIWORD (lParam) & KF_EXTENDED) && iKeyFixupEx) *piScanCode = iKeyFixupEx; @@ -248,6 +262,7 @@ winKeybdProc (DeviceIntPtr pDeviceInt, int iState) winErrorFVerb (1, "winKeybdProc - Error initializing keyboard AutoRepeat\n"); } + XkbSetExtension(pDeviceInt, ProcessKeyboardEvent); break; case DEVICE_ON: |