From 3e443587980e1370c265e0694fa760d6360715a4 Mon Sep 17 00:00:00 2001 From: Mayco Date: Sat, 6 Aug 2022 19:45:53 +0200 Subject: [PATCH 1/3] Added ability to type spaces with the input keyboard by long-pressing BACKSPACE. --- applications/gui/modules/text_input.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/applications/gui/modules/text_input.c b/applications/gui/modules/text_input.c index 711f28a326b..22deeec0065 100644 --- a/applications/gui/modules/text_input.c +++ b/applications/gui/modules/text_input.c @@ -131,7 +131,10 @@ static bool char_is_lowercase(char letter) { } static char char_to_uppercase(const char letter) { - if(isalpha(letter)) { + if(letter == BACKSPACE_KEY) { + return 0x20; + } + else if(isalpha(letter)) { return (letter - 0x20); } else { return letter; From 0f351993c248b6d2af7a016b8b85b90e3845c65f Mon Sep 17 00:00:00 2001 From: Mayco Date: Sat, 6 Aug 2022 19:51:38 +0200 Subject: [PATCH 2/3] Minor cleanup --- applications/gui/modules/text_input.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/applications/gui/modules/text_input.c b/applications/gui/modules/text_input.c index 22deeec0065..ee4a8921317 100644 --- a/applications/gui/modules/text_input.c +++ b/applications/gui/modules/text_input.c @@ -133,8 +133,7 @@ static bool char_is_lowercase(char letter) { static char char_to_uppercase(const char letter) { if(letter == BACKSPACE_KEY) { return 0x20; - } - else if(isalpha(letter)) { + } else if(isalpha(letter)) { return (letter - 0x20); } else { return letter; From 7fdf01078397e65e10e18e10d9812ec070ad3375 Mon Sep 17 00:00:00 2001 From: Mayco Date: Sat, 6 Aug 2022 20:19:08 +0200 Subject: [PATCH 3/3] Changed long-press function from BACKSPACE to "_". --- applications/gui/modules/text_input.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/applications/gui/modules/text_input.c b/applications/gui/modules/text_input.c index ee4a8921317..65864c6c179 100644 --- a/applications/gui/modules/text_input.c +++ b/applications/gui/modules/text_input.c @@ -131,7 +131,7 @@ static bool char_is_lowercase(char letter) { } static char char_to_uppercase(const char letter) { - if(letter == BACKSPACE_KEY) { + if(letter == '_') { return 0x20; } else if(isalpha(letter)) { return (letter - 0x20);