From 372a92baa5fbb61a6658fb7e30e97e131fd4ea98 Mon Sep 17 00:00:00 2001 From: Leon Styhre Date: Sun, 19 Sep 2021 23:08:12 +0200 Subject: [PATCH] The navigation key repeat now stops when selecting a key on the virtual keyboard. --- es-core/src/guis/GuiTextEditKeyboardPopup.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/es-core/src/guis/GuiTextEditKeyboardPopup.cpp b/es-core/src/guis/GuiTextEditKeyboardPopup.cpp index b6017eed1..5699bf550 100644 --- a/es-core/src/guis/GuiTextEditKeyboardPopup.cpp +++ b/es-core/src/guis/GuiTextEditKeyboardPopup.cpp @@ -337,6 +337,12 @@ bool GuiTextEditKeyboardPopup::input(InputConfig* config, Input input) return true; } + // Pressing a key stops the navigation repeat, i.e. the cursor stops at the selected key. + if (config->isMappedTo("a", input) && input.value && !mText->isEditing()) { + mNavigationRepeatDirX = 0; + mNavigationRepeatDirY = 0; + } + // If the keyboard has been configured with backspace as the back button (which is the default // configuration) then ignore this key if we're currently editing or otherwise it would be // impossible to erase characters using this key.