Tried to fix Windows unicode messages

Former-commit-id: bf4680a4507545d7d91171efd86e6265c07e7343
This commit is contained in:
Lynix 2013-03-13 17:49:13 +01:00
parent 593fec134d
commit b2318b5261
1 changed files with 19 additions and 0 deletions

View File

@ -880,6 +880,25 @@ bool NzWindowImpl::HandleMessage(HWND window, UINT message, WPARAM wParam, LPARA
break;
}
case WM_UNICHAR:
{
// http://msdn.microsoft.com/en-us/library/windows/desktop/ms646288(v=vs.85).aspx
if (wParam != UNICODE_NOCHAR)
{
bool repeated = ((HIWORD(lParam) & KF_REPEAT) != 0);
if (m_keyRepeat || !repeated)
{
NzEvent event;
event.type = nzEventType_TextEntered;
event.text.character = static_cast<char32_t>(wParam);
event.text.repeated = repeated;
m_parent->PushEvent(event);
}
return true;
}
}
case WM_XBUTTONDBLCLK:
{
NzEvent event;