Index: win32ss/user/user32/windows/accel.c =================================================================== --- win32ss/user/user32/windows/accel.c (revision 62704) +++ win32ss/user/user32/windows/accel.c (working copy) @@ -344,21 +344,41 @@ */ int WINAPI TranslateAcceleratorA(HWND hWnd, HACCEL hAccTable, LPMSG lpMsg) { - MSG mCopy = *lpMsg; - CHAR cChar; - WCHAR wChar; - NTSTATUS Status; + MSG msgW; - if(!U32IsValidAccelMessage(lpMsg->message)) return 0; + NTSTATUS Status; - Status = RtlMultiByteToUnicodeN(&wChar, sizeof(wChar), NULL, &cChar, sizeof(cChar)); - if(!NT_SUCCESS(Status)) - { - SetLastError(RtlNtStatusToDosError(Status)); - return 0; - } + if(!U32IsValidAccelMessage(lpMsg->message)) return 0; - return TranslateAcceleratorW(hWnd, hAccTable, &mCopy); + switch (lpMsg->message) + { + case WM_KEYDOWN: + case WM_SYSKEYDOWN: + return TranslateAcceleratorW (hWnd, hAccTable, lpMsg); + + case WM_CHAR: + case WM_SYSCHAR: + { + MSG msgW = *lpMsg; + char cChar = LOWORD(lpMsg->wParam); + WCHAR wChar; + + Status = RtlMultiByteToUnicodeN(&wChar, sizeof(wChar), NULL, &cChar, sizeof(cChar)); + + if(!NT_SUCCESS(Status)) + { + SetLastError(RtlNtStatusToDosError(Status)); + return 0; + } + + msgW.wParam = MAKEWPARAM(wChar, HIWORD(lpMsg->wParam)); + return TranslateAcceleratorW( hWnd, hAccTable, &msgW ); + } + + default: + return 0; + } + } /* EOF */