From eb9a73c97553a2086eac04719c7b8e9f3cbf8f60 Mon Sep 17 00:00:00 2001 From: Katayama Hirofumi MZ Date: Thu, 23 Apr 2026 22:53:36 +0900 Subject: [PATCH] [NTUSER] IntImmProcessKey: Use KF_... flags (#8897) A tiny refactoring for code readability. JIRA issue: CORE-19268 Use HIWORD macro and KF_... constants. --- win32ss/user/ntuser/ime.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/win32ss/user/ntuser/ime.c b/win32ss/user/ntuser/ime.c index 2033697c185..8c91a187ae7 100644 --- a/win32ss/user/ntuser/ime.c +++ b/win32ss/user/ntuser/ime.c @@ -295,7 +295,7 @@ IntCheckImeHotKey( { PIMEHOTKEY pHotKey; UINT uModifiers; - BOOL bKeyUp = (lParam & 0x80000000); + BOOL bKeyUp = (HIWORD(lParam) & KF_UP); const BYTE *KeyState = MessageQueue->afKeyState; static UINT s_uKeyUpVKey = 0; @@ -681,7 +681,7 @@ IntImmProcessKey( if (!pIMC) return 0; - if ((lParam & (KF_UP << 16)) && + if ((HIWORD(lParam) & KF_UP) && (pKL->piiex->ImeInfo.fdwProperty & IME_PROP_IGNORE_UPKEYS)) { return 0; @@ -709,7 +709,7 @@ IntImmProcessKey( if (!(pKL->piiex->ImeInfo.fdwProperty & IME_PROP_NEED_ALTKEY)) { - if (uVirtualKey == VK_MENU || (lParam & 0x20000000)) + if (uVirtualKey == VK_MENU || (HIWORD(lParam) & KF_ALTDOWN)) return 0; } break;