From 2b68bf7542d8d54b5cb2f3e75e0a8062cf75f2a7 Mon Sep 17 00:00:00 2001 From: Willy-JL <49810075+Willy-JL@users.noreply.github.com> Date: Tue, 14 Mar 2023 01:35:58 +0000 Subject: [PATCH] Update keyboard offset logic (fix #168) --- applications/services/gui/modules/text_input.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/applications/services/gui/modules/text_input.c b/applications/services/gui/modules/text_input.c index f39adcd9c..f693e6097 100644 --- a/applications/services/gui/modules/text_input.c +++ b/applications/services/gui/modules/text_input.c @@ -381,7 +381,7 @@ static void text_input_handle_up(TextInput* text_input, TextInputModel* model) { if(model->selected_row > 0) { model->selected_row--; if(model->selected_column > - get_row_size(keyboards[model->selected_keyboard], model->selected_row) - 6) { + get_row_size(keyboards[model->selected_keyboard], model->selected_row) - 6 && model->selected_row == 0) { model->selected_column = model->selected_column + 1; } } @@ -392,7 +392,7 @@ static void text_input_handle_down(TextInput* text_input, TextInputModel* model) if(model->selected_row < keyboard_row_count - 1) { model->selected_row++; if(model->selected_column > - get_row_size(keyboards[model->selected_keyboard], model->selected_row) - 4) { + get_row_size(keyboards[model->selected_keyboard], model->selected_row) - 4 && model->selected_row == 1) { model->selected_column = model->selected_column - 1; } }