mirror of
https://github.com/gnif/LookingGlass.git
synced 2025-08-09 20:24:14 +00:00
[client] imgui: implement keyboard input forwarding and capture
This commit is contained in:
@@ -288,6 +288,13 @@ void app_handleKeyPress(int sc)
|
||||
return;
|
||||
}
|
||||
|
||||
if (g_state.overlayInput)
|
||||
{
|
||||
g_state.io->KeysDown[sc] = true;
|
||||
if (g_state.io->WantCaptureKeyboard)
|
||||
return;
|
||||
}
|
||||
|
||||
if (!core_inputEnabled())
|
||||
return;
|
||||
|
||||
@@ -336,6 +343,13 @@ void app_handleKeyRelease(int sc)
|
||||
if (!core_inputEnabled())
|
||||
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
|
||||
if (!g_state.keyDown[sc])
|
||||
return;
|
||||
|
Reference in New Issue
Block a user