1

我正在尝试显示/隐藏听写工具栏,我不想简单地模拟 WIN + H 命令。我对 UWP 不太熟悉,但听写工具栏似乎是 ms-inputapp (InputHostApp.exe) 的一部分。有没有办法找出 WIN + H 正在执行的命令以显示听写工具栏?

4

1 回答 1

0

不是真正的答案,但这是我所能得到的。可能对某人有帮助。

这是explorer.exe处理Win+H热键(Windows 10 v19041.508)中的调用堆栈:

coreuicomponents.Microsoft::CoreUI::Proxy::MessageProxy::Send+119
coreuicomponents.public: virtual void __cdecl Proxy_IRemoteCoreKeyboardClient$R::IRemoteCoreKeyboardClient_Impl::OnShellStateChanged(class System::Object * __ptr64,class System::Byte_1D * __ptr64,unsigned int,bool,bool,unsigned int,unsigned int) __ptr64+7E
coreuicomponents.public: void __cdecl IRemoteCoreKeyboardClient::OnShellStateChanged(class System::Byte_1D * __ptr64,unsigned int,bool,bool,unsigned int,unsigned int) __ptr64+66
coreuicomponents.public: virtual long __cdecl IRemoteCoreKeyboardClient$X__ExportAdapter::OnShellStateChanged(struct MsgBlob * __ptr64,unsigned int,bool,bool,unsigned int,unsigned int) __ptr64+BC
windows.ui.core.textinput.public: virtual long __cdecl CCoreKeyboardManager::ShellStateChanged(struct Windows::Foundation::Collections::IVectorView<struct Windows::UI::Internal::Text::Core::CoreKeyboardPositionAndSizeOption> * __ptr64,enum Windows::UI::Internal::Text::Core::CoreKe
twinui.pcshell.private: long __cdecl KeyboardHosting::TabTipAdapter::ProcessShowRequest(enum Windows::UI::Internal::Text::Core::CoreKeyboardViewType) __ptr64+11F
twinui.pcshell.private: long __cdecl KeyboardHosting::TabTipAdapter::OnShellRequestedStateChange(enum Windows::UI::Internal::Text::Core::CoreKeyboardViewType,enum Windows::UI::Internal::Text::Core::CoreKeyboardModality,enum KeyboardHosting::ShellRequestedStateChangeReas
twinui.pcshell.public: long __cdecl KeyboardHosting::TabTipAdapter::OnShellHotKey(enum _TouchKeyboardShellHotKeyType) __ptr64+1E2
twinui.pcshell.public: virtual long __cdecl TouchKeyboardExperienceManager::OnShellHotKey(enum _TouchKeyboardShellHotKeyType) __ptr64+17
explorer.protected: void __cdecl CTray::_HandleDictationHotKey(void) __ptr64+67
explorer.protected: void __cdecl CTray::_HandleGlobalHotkey(unsigned __int64,__int64) __ptr64+417
explorer.protected: virtual __int64 __cdecl CTray::v_WndProc(struct HWND__ * __ptr64,unsigned int,unsigned __int64,__int64) __ptr64+48F

TouchKeyboardExperienceManager::OnShellHotKey()2用一个可能意味着Win+的值调用H

_HandleDictationHotKeyTouchKeyboardExperienceManager::OnShellHotKey通过类似 COM 的东西使用IID_ITouchKeyboardExperienceManager=调用9516d866-ca0f-40ca-8997-efa618b50f99,但我找不到任何调用CoCreateInstance或类似的东西。

它似乎最终通过某种 RPC 将消息发送到触摸键盘(Microsoft::CoreUI::Proxy::MessageProxy::Send

于 2020-10-10T03:44:04.250 回答