The navigation key repeat now stops when selecting a key on the virtual keyboard.

This commit is contained in:
Leon Styhre 2021-09-19 23:08:12 +02:00
parent 00e304f09a
commit 372a92baa5

View file

@ -337,6 +337,12 @@ bool GuiTextEditKeyboardPopup::input(InputConfig* config, Input input)
return true; 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 // 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 // configuration) then ignore this key if we're currently editing or otherwise it would be
// impossible to erase characters using this key. // impossible to erase characters using this key.