mirror of
https://github.com/microsoft/PowerToys.git
synced 2026-04-11 05:52:19 +02:00
[QuickAccent] Fix on-screen keyboard activation (#37581)
* fix on-screen keyboard activation * cleanup
This commit is contained in:
committed by
GitHub
parent
a16f784011
commit
e700f86ace
@@ -169,6 +169,14 @@ namespace winrt::PowerToys::PowerAccentKeyboardService::implementation
|
|||||||
|
|
||||||
if (std::find(letters.begin(), letters.end(), letterKey) != cend(letters) && m_isLanguageLetterCb(letterKey))
|
if (std::find(letters.begin(), letters.end(), letterKey) != cend(letters) && m_isLanguageLetterCb(letterKey))
|
||||||
{
|
{
|
||||||
|
if (m_toolbarVisible && letterPressed == letterKey)
|
||||||
|
{
|
||||||
|
// On-screen keyboard continuously sends WM_KEYDOWN when a key is held down
|
||||||
|
// If Quick Accent is visible, prevent the letter key from being processed
|
||||||
|
// https://github.com/microsoft/PowerToys/issues/36853
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
m_stopwatch.reset();
|
m_stopwatch.reset();
|
||||||
letterPressed = letterKey;
|
letterPressed = letterKey;
|
||||||
}
|
}
|
||||||
@@ -281,7 +289,6 @@ namespace winrt::PowerToys::PowerAccentKeyboardService::implementation
|
|||||||
}
|
}
|
||||||
|
|
||||||
LRESULT KeyboardListener::LowLevelKeyboardProc(int nCode, WPARAM wParam, LPARAM lParam)
|
LRESULT KeyboardListener::LowLevelKeyboardProc(int nCode, WPARAM wParam, LPARAM lParam)
|
||||||
{
|
|
||||||
{
|
{
|
||||||
if (nCode == HC_ACTION && s_instance != nullptr)
|
if (nCode == HC_ACTION && s_instance != nullptr)
|
||||||
{
|
{
|
||||||
@@ -309,5 +316,4 @@ namespace winrt::PowerToys::PowerAccentKeyboardService::implementation
|
|||||||
|
|
||||||
return CallNextHookEx(NULL, nCode, wParam, lParam);
|
return CallNextHookEx(NULL, nCode, wParam, lParam);
|
||||||
}
|
}
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user