From f3e3e828aa6e695986e604ccbd47b896d9e338b2 Mon Sep 17 00:00:00 2001 From: Willy-JL Date: Fri, 24 Feb 2023 00:10:04 +0000 Subject: [PATCH 1/3] Fix keyboard capitalization bug --- applications/services/gui/modules/text_input.c | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-) diff --git a/applications/services/gui/modules/text_input.c b/applications/services/gui/modules/text_input.c index 60700f12a..ebe32b7a5 100644 --- a/applications/services/gui/modules/text_input.c +++ b/applications/services/gui/modules/text_input.c @@ -138,7 +138,7 @@ static bool char_is_lowercase(char letter) { static char char_to_uppercase(const char letter) { if(letter == '_') { return 0x20; - } else if(islower(letter)) { + } else if(char_is_lowercase(letter)) { return (letter - 0x20); } else { return letter; @@ -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,12 +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); - bool toggle_case = text_length == 0; - if(shift) toggle_case = !toggle_case; - if(toggle_case) { - selected = char_to_uppercase(selected); - } - if(selected == ENTER_KEY) { if(model->validator_callback && (!model->validator_callback( @@ -331,6 +324,9 @@ 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))) { + selected = char_to_uppercase(selected); + } model->text_buffer[text_length] = selected; model->text_buffer[text_length + 1] = 0; } From f8eda660d2e5a47bf631e1d33382285c6cf3c7a0 Mon Sep 17 00:00:00 2001 From: Willy-JL Date: Fri, 24 Feb 2023 00:49:41 +0000 Subject: [PATCH 2/3] Keyboard long press first char for lowercase --- 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 ebe32b7a5..5fd306aa6 100644 --- a/applications/services/gui/modules/text_input.c +++ b/applications/services/gui/modules/text_input.c @@ -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; From 86da6a7ffe4429a1ff58db540237a3ff0dd88efe Mon Sep 17 00:00:00 2001 From: MX <10697207+xMasterX@users.noreply.github.com> Date: Fri, 24 Feb 2023 04:15:32 +0300 Subject: [PATCH 3/3] Update changelog --- CHANGELOG.md | 23 +++++++++++++++-------- 1 file changed, 15 insertions(+), 8 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 96f3c65d6..d9fd54ba0 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,12 +1,19 @@ ### New changes -* SubGHz: **Nice ON2E (Nice One)** support (by @assasinfil | PR #335) -* SubGHz: Remove 467.75 From freq analyzer since it has too much noise (Frequency is still can be used, just excluded from FA to avoid false detections) -* Archive and FileBrowser: **Fixed more navigation issues** (by @Willy-JL | PR #334) -* Plugins -> SubGHz Bruteforcer: Fix Linear Delta 3 repeats (now its more stable and we will be sure signal is received correctly) -* Plugins: Updated TOTP (Authenticator) [(by akopachov)](https://github.com/akopachov/flipper-zero_authenticator) -* OFW: **Fix Cyfral & Metakom emulation (My temp fix removed and proper fix from OFW applied)** -* OFW: BadUSB: disable CDC mode, USB mode switch fix -* OFW: Updater visual fixes +* Desktop: Autolock with PIN Code (by @Willy-JL | PR #338) - **Desktop settings (pin code, favourite app, autolock time) will be resetted!!! Only one time after installing - due to changes in settings structure, after installing of this release desktop settings will not be reset with next release** +* Desktop: Faster back button hold time for power off, was 2 seconds, now 1.3sec +* GUI: Fix keyboard capitalization bug (by @Willy-JL | PR #362) (fixes #361) +* Plugins: Added **SWD Probe** [(by g3gg0)](https://github.com/g3gg0/flipper-swd_probe) (moved from extra pack into main FW) +* Plugins: Show RSSI in Weather Station app and in POCSAG Pager app +* Plugins: Improve Tetris fall speed algorithm (by @p3ngu19z | PR #343) +* Plugins: Add missing buttons into HID app, remove old keyboard app, move Bluetooth remote to Misc +* Infrared: Assets update (by @amec0e | PR #340 / #357 / #358) +* Misc: Typo combing (by @Round-Pi | PR #352) +* OFW: Dolphin: drop holiday animation +* OFW: fbt: FBT_QUIET option; docs on environment +* OFW: Delete rwfiletest.bin on exit SDcard benchmark +* OFW: Re-init NFC when starting the worker +* OFW: Up toolchain version to 21 +* OFW: Display Mifare Classic data in NFC app #### [🎲 Download latest extra apps pack](https://download-directory.github.io/?url=https://github.com/xMasterX/unleashed-extra-pack/tree/main/apps)