【发布时间】:2015-03-18 18:41:53
【问题描述】:
如果我按下键盘上的一个键,我想接收正确的本地化 Unicode-Char。 (在使用 C++ 或 C# 的 Windows 8.1 应用商店应用程序中)
我目前正在通过KeyEventArgs-Event 接收键盘输入
C++:
Windows::UI::Core::CoreWindow^ window = Windows::UI::Core::CoreWindow::GetForCurrentThread();
window->KeyDown += ref new Windows::Foundation::TypedEventHandler<Windows::UI::Core::CoreWindow^, Windows::UI::Core::KeyEventArgs^>(this, &ComponentInterface::OnKeyDown);
void ComponentInterface::OnKeyDown(Windows::UI::Core::CoreWindow^ window, Windows::UI::Core::KeyEventArgs^ e)
{
unsigned int key = e->KeyStatus.ScanCode;
}
【问题讨论】:
标签: c# c++ unicode windows-store-apps windows-8.1