If wParam of WM_KEYDOWN is VK_PROCESSKEY, the key input process of SDL is not called.

This commit is contained in:
nanshiki 2023-05-23 18:51:40 +09:00
parent 5fd11d6eb7
commit 4dd57fb1db
2 changed files with 2 additions and 3 deletions

View File

@ -319,7 +319,7 @@ LRESULT DIB_HandleMessage(_THIS, HWND hwnd, UINT msg, WPARAM wParam, LPARAM lPar
{
SDL_keysym *key = TranslateKey(wParam,HIWORD(lParam),&keysym,1);
#ifdef ENABLE_IM_EVENT
if (!IM_Context.bCompos && (GetTickCount() - end_ticks > IME_END_CR_WAIT || key->sym != 0x0d))
if (wParam != VK_PROCESSKEY && !IM_Context.bCompos && (GetTickCount() - end_ticks > IME_END_CR_WAIT || key->sym != 0x0d))
#endif
{
posted = SDL_PrivateKeyboard(SDL_PRESSED,key);

View File

@ -636,8 +636,7 @@ WIN_WindowProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam)
SDL_SendWindowEvent(data->window, SDL_WINDOWEVENT_CLOSE, 0, 0);
}
}
if (code != SDL_SCANCODE_UNKNOWN) {
if ((wParam != VK_PROCESSKEY || (lParam >> 16) == 0x39) && code != SDL_SCANCODE_UNKNOWN) {
SDL_SendKeyboardKey(SDL_PRESSED, code);
}
}