mirror of
https://github.com/DarkFlippers/unleashed-firmware.git
synced 2025-12-12 12:42:30 +04:00
Keyboard long press first char for lowercase
This commit is contained in:
@@ -237,7 +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) {
|
||||
canvas_draw_glyph(
|
||||
canvas,
|
||||
keyboard_origin_x + keys[column].x,
|
||||
@@ -324,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(shift || (text_length == 0 && char_is_lowercase(selected))) {
|
||||
if(shift != (text_length == 0)) {
|
||||
selected = char_to_uppercase(selected);
|
||||
}
|
||||
model->text_buffer[text_length] = selected;
|
||||
|
||||
Reference in New Issue
Block a user