Parcourir la source

Add ability to type a space with the input keyboard by long-pressing "_" (#1550)

Co-authored-by: Mayco <tristan@polymerprints.nl>
Co-authored-by: あく <alleteam@gmail.com>
Mayco il y a 3 ans
Parent
commit
81b404aafa
1 fichiers modifiés avec 3 ajouts et 1 suppressions
  1. 3 1
      applications/gui/modules/text_input.c

+ 3 - 1
applications/gui/modules/text_input.c

@@ -131,7 +131,9 @@ static bool char_is_lowercase(char letter) {
 }
 
 static char char_to_uppercase(const char letter) {
-    if(isalpha(letter)) {
+    if(letter == '_') {
+        return 0x20;
+    } else if(isalpha(letter)) {
         return (letter - 0x20);
     } else {
         return letter;