diff --git a/applications/services/gui/modules/text_input.c b/applications/services/gui/modules/text_input.c index 9004304cb..d98128c6d 100644 --- a/applications/services/gui/modules/text_input.c +++ b/applications/services/gui/modules/text_input.c @@ -237,8 +237,7 @@ static void text_input_view_draw_callback(Canvas* canvas, void* _model) { canvas_set_color(canvas, ColorBlack); } - if(model->clear_default_text || - (text_length == 0 && char_is_lowercase(keys[column].text))) { + if((model->clear_default_text || text_length == 0) && char_is_lowercase(keys[column].text)) { canvas_draw_glyph( canvas, keyboard_origin_x + keys[column].x, @@ -309,10 +308,6 @@ static void text_input_handle_ok(TextInput* text_input, TextInputModel* model, b char selected = get_selected_char(model); size_t text_length = strlen(model->text_buffer); - if(shift) { - selected = char_to_uppercase(selected); - } - if(selected == ENTER_KEY) { if(model->validator_callback && (!model->validator_callback( @@ -329,7 +324,7 @@ static void text_input_handle_ok(TextInput* text_input, TextInputModel* model, b text_length = 0; } if(text_length < (model->text_buffer_size - 1)) { - if(text_length == 0 && char_is_lowercase(selected)) { + if(shift || (text_length == 0 && char_is_lowercase(selected))) { selected = char_to_uppercase(selected); } model->text_buffer[text_length] = selected; @@ -568,4 +563,4 @@ void* text_input_get_validator_callback_context(TextInput* text_input) { void text_input_set_header_text(TextInput* text_input, const char* text) { with_view_model( text_input->view, TextInputModel * model, { model->header = text; }, true); -} \ No newline at end of file +}