Commit d7131ff2 authored by Gargaj's avatar Gargaj
Browse files

separate wm_char and wm_keydown

parent e780a067
......@@ -164,13 +164,16 @@ void main()
else if (bShowGui)
{
bool consumed = false;
if (Renderer::keyEventBuffer[i].scanCode)
{
mShaderEditor.KeyDown(
iswalpha(Renderer::keyEventBuffer[i].scanCode) ? towupper(Renderer::keyEventBuffer[i].scanCode) : Renderer::keyEventBuffer[i].scanCode,
Renderer::keyEventBuffer[i].shift,
Renderer::keyEventBuffer[i].ctrl,
Renderer::keyEventBuffer[i].alt,
&consumed);
if (!consumed)
}
if (!consumed && Renderer::keyEventBuffer[i].character)
{
char utf8[5] = {0,0,0,0,0};
wchar_t utf16[2] = {Renderer::keyEventBuffer[i].character, 0};
......
......@@ -114,14 +114,14 @@ namespace Renderer
keyEventBuffer[keyEventBufferCount].alt = GetAsyncKeyState( VK_LMENU ) || GetAsyncKeyState( VK_RMENU );
keyEventBuffer[keyEventBufferCount].shift = GetAsyncKeyState( VK_LSHIFT ) || GetAsyncKeyState( VK_RSHIFT );
keyEventBuffer[keyEventBufferCount].scanCode = sciKey;
keyEventBuffer[keyEventBufferCount].character = sciKey;
keyEventBuffer[keyEventBufferCount].character = 0;
keyEventBufferCount++;
}
//pKeys[wParam] = 1;
} break;
case WM_CHAR:
{
//if (sciKey)
if (wParam >= 32)
{
keyEventBuffer[keyEventBufferCount].ctrl = GetAsyncKeyState( VK_LCONTROL ) || GetAsyncKeyState( VK_RCONTROL );
keyEventBuffer[keyEventBufferCount].alt = GetAsyncKeyState( VK_LMENU ) || GetAsyncKeyState( VK_RMENU );
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment