mirror of
https://github.com/gnif/LookingGlass.git
synced 2025-01-10 23:07:04 +00:00
[client] imgui: implement keyboard input forwarding and capture
This commit is contained in:
parent
065d90c3f7
commit
1c58b3a087
@ -288,6 +288,13 @@ void app_handleKeyPress(int sc)
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (g_state.overlayInput)
|
||||||
|
{
|
||||||
|
g_state.io->KeysDown[sc] = true;
|
||||||
|
if (g_state.io->WantCaptureKeyboard)
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
if (!core_inputEnabled())
|
if (!core_inputEnabled())
|
||||||
return;
|
return;
|
||||||
|
|
||||||
@ -336,6 +343,13 @@ void app_handleKeyRelease(int sc)
|
|||||||
if (!core_inputEnabled())
|
if (!core_inputEnabled())
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
if (g_state.overlayInput)
|
||||||
|
{
|
||||||
|
g_state.io->KeysDown[sc] = false;
|
||||||
|
if (g_state.io->WantCaptureKeyboard)
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
// avoid sending key up events when we didn't send a down
|
// avoid sending key up events when we didn't send a down
|
||||||
if (!g_state.keyDown[sc])
|
if (!g_state.keyDown[sc])
|
||||||
return;
|
return;
|
||||||
|
Loading…
Reference in New Issue
Block a user