[client] app: allow key-repeat to work with keybinds

This commit is contained in:
Geoffrey McRae 2022-01-17 20:33:57 +11:00
parent 5a3fe151e4
commit 42ed0d7638

View File

@ -313,6 +313,9 @@ void app_handleKeyPress(int sc)
if (g_state.escapeActive) if (g_state.escapeActive)
{ {
g_state.escapeAction = sc; g_state.escapeAction = sc;
KeybindHandle handle = g_state.bindings[sc];
if (handle)
handle->callback(sc, handle->opaque);
return; return;
} }
} }
@ -358,15 +361,6 @@ void app_handleKeyRelease(int sc)
!app_isOverlayMode()) !app_isOverlayMode())
core_setGrab(!g_cursor.grab); core_setGrab(!g_cursor.grab);
} }
else
{
KeybindHandle handle = g_state.bindings[sc];
if (handle)
{
handle->callback(sc, handle->opaque);
return;
}
}
if (sc == g_params.escapeKey) if (sc == g_params.escapeKey)
g_state.escapeActive = false; g_state.escapeActive = false;