From 42ed0d76380a281cee793db68c2a267cbf18282a Mon Sep 17 00:00:00 2001 From: Geoffrey McRae Date: Mon, 17 Jan 2022 20:33:57 +1100 Subject: [PATCH] [client] app: allow key-repeat to work with keybinds --- client/src/app.c | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/client/src/app.c b/client/src/app.c index 19a85add..7f3a8792 100644 --- a/client/src/app.c +++ b/client/src/app.c @@ -313,6 +313,9 @@ void app_handleKeyPress(int sc) if (g_state.escapeActive) { g_state.escapeAction = sc; + KeybindHandle handle = g_state.bindings[sc]; + if (handle) + handle->callback(sc, handle->opaque); return; } } @@ -358,15 +361,6 @@ void app_handleKeyRelease(int sc) !app_isOverlayMode()) 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) g_state.escapeActive = false;