From 29e0613d7e6a63f93a79bfc1c038a6aadad13299 Mon Sep 17 00:00:00 2001 From: neisenlo Date: Fri, 21 Apr 2023 12:30:45 -0400 Subject: [PATCH] Implemented and ignored number key row for ipad. --- Keyboards/KeyboardsBase/InterfaceVariables.swift | 9 ++++++++- .../French-AZERTY/FR-AZERTYInterfaceVariables.swift | 9 ++++++++- .../French-QWERTY/FR-QWERTYInterfaceVariables.swift | 8 +++++++- .../German/DEInterfaceVariables.swift | 9 ++++++++- .../Italian/ITInterfaceVariables.swift | 9 ++++++++- .../Portuguese/PTInterfaceVariables.swift | 9 ++++++++- .../Russian/RUInterfaceVariables.swift | 9 ++++++++- .../Spanish/ESInterfaceVariables.swift | 11 +++++++++-- .../Swedish/SVInterfaceVariables.swift | 9 ++++++++- 9 files changed, 72 insertions(+), 10 deletions(-) diff --git a/Keyboards/KeyboardsBase/InterfaceVariables.swift b/Keyboards/KeyboardsBase/InterfaceVariables.swift index e5b76626..34f1bfbb 100644 --- a/Keyboards/KeyboardsBase/InterfaceVariables.swift +++ b/Keyboards/KeyboardsBase/InterfaceVariables.swift @@ -218,7 +218,8 @@ public enum EnglishKeyboardConstants { ] static let letterKeysPad = [ - ["q", "w", "e", "r", "t", "y", "u", "i", "o", "p", "delete"], + ["1", "2", "3", "4", "5", "6", "7", "8", "9", "0","-", "=", "delete"], + ["q", "w", "e", "r", "t", "y", "u", "i", "o", "p"], ["a", "s", "d", "f", "g", "h", "j", "k", "l", "return"], ["shift", "w", "x", "c", "v", "b", "n", "m", ",", ".", "shift"], [".?123", "selectKeyboard", "space", ".?123", "hideKeyboard"], // "undoArrow" @@ -270,9 +271,15 @@ func getENKeys() { letterKeys = EnglishKeyboardConstants.letterKeysPad numberKeys = EnglishKeyboardConstants.numberKeysPad symbolKeys = EnglishKeyboardConstants.symbolKeysPad + + //if the ipad is too samll for numbers + letterKeys.removeFirst(1) + letterKeys[0].append("delete") + allKeys = Array(letterKeys.joined()) + Array(numberKeys.joined()) + Array(symbolKeys.joined()) leftKeyChars = ["q", "1"] + // TODO: add "p" to rightKeyChar if has 4 rows rightKeyChars = [] centralKeyChars = allKeys.filter { !leftKeyChars.contains($0) && !rightKeyChars.contains($0) } } diff --git a/Keyboards/LanguageKeyboards/French/French-AZERTY/FR-AZERTYInterfaceVariables.swift b/Keyboards/LanguageKeyboards/French/French-AZERTY/FR-AZERTYInterfaceVariables.swift index 01c1bae3..d6c08f2a 100644 --- a/Keyboards/LanguageKeyboards/French/French-AZERTY/FR-AZERTYInterfaceVariables.swift +++ b/Keyboards/LanguageKeyboards/French/French-AZERTY/FR-AZERTYInterfaceVariables.swift @@ -28,7 +28,8 @@ public enum FrenchAZERTYKeyboardConstants { ] static let letterKeysPad = [ - ["a", "z", "e", "r", "t", "y", "u", "i", "o", "p", "delete"], + ["1", "2", "3", "4", "5", "6", "7", "8", "9", "0","-", "=", "delete"], + ["a", "z", "e", "r", "t", "y", "u", "i", "o", "p"], ["q", "s", "d", "f", "g", "h", "j", "k", "l", "m", "return"], ["shift", "w", "x", "c", "v", "b", "n", "´", ",", ".", "shift"], ["selectKeyboard", ".?123", "space", ".?123", "hideKeyboard"], // "undoArrow" @@ -78,9 +79,15 @@ func getFRAZERTYKeys() { letterKeys = FrenchAZERTYKeyboardConstants.letterKeysPad numberKeys = FrenchAZERTYKeyboardConstants.numberKeysPad symbolKeys = FrenchAZERTYKeyboardConstants.symbolKeysPad + + //if the ipad is too samll for numbers + letterKeys.removeFirst(1) + letterKeys[0].append("delete") + allKeys = Array(letterKeys.joined()) + Array(numberKeys.joined()) + Array(symbolKeys.joined()) leftKeyChars = ["q", "a", "1", "@", "~"] + // TODO: add "p" to rightKeyChar if has 4 rows rightKeyChars = [] centralKeyChars = allKeys.filter { !leftKeyChars.contains($0) && !rightKeyChars.contains($0) } } diff --git a/Keyboards/LanguageKeyboards/French/French-QWERTY/FR-QWERTYInterfaceVariables.swift b/Keyboards/LanguageKeyboards/French/French-QWERTY/FR-QWERTYInterfaceVariables.swift index a2f2997d..2bf2e23a 100644 --- a/Keyboards/LanguageKeyboards/French/French-QWERTY/FR-QWERTYInterfaceVariables.swift +++ b/Keyboards/LanguageKeyboards/French/French-QWERTY/FR-QWERTYInterfaceVariables.swift @@ -28,7 +28,8 @@ public enum FrenchQWERTYKeyboardConstants { ] static let letterKeysPad = [ - ["a", "z", "e", "r", "t", "y", "u", "i", "o", "p", "delete"], + ["1", "2", "3", "4", "5", "6", "7", "8", "9", "0","-", "=", "delete"], + ["a", "z", "e", "r", "t", "y", "u", "i", "o", "p"], ["q", "s", "d", "f", "g", "h", "j", "k", "l", "m", "return"], ["shift", "w", "x", "c", "v", "b", "n", "´", ",", ".", "shift"], ["selectKeyboard", ".?123", "space", ".?123", "hideKeyboard"], // "undoArrow" @@ -78,6 +79,11 @@ func getFRQWERTYKeys() { letterKeys = FrenchQWERTYKeyboardConstants.letterKeysPad numberKeys = FrenchQWERTYKeyboardConstants.numberKeysPad symbolKeys = FrenchQWERTYKeyboardConstants.symbolKeysPad + + //if the ipad is too samll for numbers + letterKeys.removeFirst(1) + letterKeys[0].append("delete") + allKeys = Array(letterKeys.joined()) + Array(numberKeys.joined()) + Array(symbolKeys.joined()) leftKeyChars = ["q", "a", "1", "@", "~"] diff --git a/Keyboards/LanguageKeyboards/German/DEInterfaceVariables.swift b/Keyboards/LanguageKeyboards/German/DEInterfaceVariables.swift index 623960be..b2538305 100644 --- a/Keyboards/LanguageKeyboards/German/DEInterfaceVariables.swift +++ b/Keyboards/LanguageKeyboards/German/DEInterfaceVariables.swift @@ -30,7 +30,8 @@ public enum GermanKeyboardConstants { ] static let letterKeysPad = [ - ["q", "w", "e", "r", "t", "z", "u", "i", "o", "p", "ü", "delete"], + ["1", "2", "3", "4", "5", "6", "7", "8", "9", "0","-", "=", "delete"], + ["q", "w", "e", "r", "t", "z", "u", "i", "o", "p", "ü"], ["a", "s", "d", "f", "g", "h", "j", "k", "l", "ö", "ä", "return"], ["shift", "y", "x", "c", "v", "b", "n", "m", ",", ".", "ß", "shift"], ["selectKeyboard", ".?123", "space", ".?123", "hideKeyboard"], // "undoArrow" @@ -83,9 +84,15 @@ func getDEKeys() { letterKeys = GermanKeyboardConstants.letterKeysPad numberKeys = GermanKeyboardConstants.numberKeysPad symbolKeys = GermanKeyboardConstants.symbolKeysPad + + //if the ipad is too samll for numbers + letterKeys.removeFirst(1) + letterKeys[0].append("delete") + allKeys = Array(letterKeys.joined()) + Array(numberKeys.joined()) + Array(symbolKeys.joined()) leftKeyChars = ["q", "a", "1", "\"", "$"] + // TODO: add "ü" to rightKeyChar if has 4 rows rightKeyChars = [] centralKeyChars = allKeys.filter { !leftKeyChars.contains($0) && !rightKeyChars.contains($0) } } diff --git a/Keyboards/LanguageKeyboards/Italian/ITInterfaceVariables.swift b/Keyboards/LanguageKeyboards/Italian/ITInterfaceVariables.swift index c77ebe46..720b7780 100644 --- a/Keyboards/LanguageKeyboards/Italian/ITInterfaceVariables.swift +++ b/Keyboards/LanguageKeyboards/Italian/ITInterfaceVariables.swift @@ -30,7 +30,8 @@ public enum ItalianKeyboardConstants { ] static let letterKeysPad = [ - ["q", "w", "e", "r", "t", "y", "u", "i", "o", "p", "delete"], + ["1", "2", "3", "4", "5", "6", "7", "8", "9", "0","-", "=", "delete"], + ["q", "w", "e", "r", "t", "y", "u", "i", "o", "p"], ["a", "s", "d", "f", "g", "h", "j", "k", "l", "return"], ["shift", "z", "x", "c", "v", "b", "n", "m", ",", ".", "shift"], ["selectKeyboard", ".?123", "space", ".?123", "hideKeyboard"], // "undoArrow" @@ -80,9 +81,15 @@ func getITKeys() { letterKeys = ItalianKeyboardConstants.letterKeysPad numberKeys = ItalianKeyboardConstants.numberKeysPad symbolKeys = ItalianKeyboardConstants.symbolKeysPad + + //if the ipad is too samll for numbers + letterKeys.removeFirst(1) + letterKeys[0].append("delete") + allKeys = Array(letterKeys.joined()) + Array(numberKeys.joined()) + Array(symbolKeys.joined()) leftKeyChars = ["q", "1"] + // TODO: add "p" to rightKeyChar if has 4 rows rightKeyChars = [] centralKeyChars = allKeys.filter { !leftKeyChars.contains($0) && !rightKeyChars.contains($0) } } diff --git a/Keyboards/LanguageKeyboards/Portuguese/PTInterfaceVariables.swift b/Keyboards/LanguageKeyboards/Portuguese/PTInterfaceVariables.swift index 98c692ee..fb2f9d91 100644 --- a/Keyboards/LanguageKeyboards/Portuguese/PTInterfaceVariables.swift +++ b/Keyboards/LanguageKeyboards/Portuguese/PTInterfaceVariables.swift @@ -30,7 +30,8 @@ public enum PortugueseKeyboardConstants { ] static let letterKeysPad = [ - ["q", "w", "e", "r", "t", "y", "u", "i", "o", "p", "delete"], + ["1", "2", "3", "4", "5", "6", "7", "8", "9", "0","-", "=", "delete"], + ["q", "w", "e", "r", "t", "y", "u", "i", "o", "p"], ["a", "s", "d", "f", "g", "h", "j", "k", "l", "return"], ["shift", "z", "x", "c", "v", "b", "n", "m", "!", "?", "shift"], ["selectKeyboard", ".?123", "space", ".?123", "hideKeyboard"], // "undoArrow" @@ -79,10 +80,16 @@ func getPTKeys() { letterKeys = PortugueseKeyboardConstants.letterKeysPad numberKeys = PortugueseKeyboardConstants.numberKeysPad symbolKeys = PortugueseKeyboardConstants.symbolKeysPad + + //if the ipad is too samll for numbers + letterKeys.removeFirst(1) + letterKeys[0].append("delete") + allKeys = Array(letterKeys.joined()) + Array(numberKeys.joined()) + Array(symbolKeys.joined()) leftKeyChars = ["q", "1"] rightKeyChars = [] + // TODO: add "p" to rightKeyChar if has 4 rows centralKeyChars = allKeys.filter { !leftKeyChars.contains($0) && !rightKeyChars.contains($0) } } diff --git a/Keyboards/LanguageKeyboards/Russian/RUInterfaceVariables.swift b/Keyboards/LanguageKeyboards/Russian/RUInterfaceVariables.swift index 831190fb..cf6529c2 100644 --- a/Keyboards/LanguageKeyboards/Russian/RUInterfaceVariables.swift +++ b/Keyboards/LanguageKeyboards/Russian/RUInterfaceVariables.swift @@ -30,7 +30,8 @@ public enum RussianKeyboardConstants { ] static let letterKeysPad = [ - ["й", "ц", "у", "к", "е", "н", "г", "ш", "щ", "з", "х", "delete"], + ["1", "2", "3", "4", "5", "6", "7", "8", "9", "0","-", "=", "delete"], + ["й", "ц", "у", "к", "е", "н", "г", "ш", "щ", "з", "х"], ["ф", "ы", "в", "а", "п", "р", "о", "л", "д", "ж", "э", "return"], ["shift", "я", "ч", "с", "м", "и", "т", "ь", "б", "ю", ".", "shift"], ["selectKeyboard", ".?123", "space", ".?123", "hideKeyboard"], // "undoArrow" @@ -74,10 +75,16 @@ func getRUKeys() { letterKeys = RussianKeyboardConstants.letterKeysPad numberKeys = RussianKeyboardConstants.numberKeysPad symbolKeys = RussianKeyboardConstants.symbolKeysPad + + //if the ipad is too samll for numbers + letterKeys.removeFirst(1) + letterKeys[0].append("delete") + allKeys = Array(letterKeys.joined()) + Array(numberKeys.joined()) + Array(symbolKeys.joined()) leftKeyChars = ["й", "ф", "1", "@", "$"] rightKeyChars = [] + // TODO: add "х" to rightKeyChar if has 4 rows centralKeyChars = allKeys.filter { !leftKeyChars.contains($0) && !rightKeyChars.contains($0) } } diff --git a/Keyboards/LanguageKeyboards/Spanish/ESInterfaceVariables.swift b/Keyboards/LanguageKeyboards/Spanish/ESInterfaceVariables.swift index 94434ebc..becde8b9 100644 --- a/Keyboards/LanguageKeyboards/Spanish/ESInterfaceVariables.swift +++ b/Keyboards/LanguageKeyboards/Spanish/ESInterfaceVariables.swift @@ -30,7 +30,8 @@ public enum SpanishKeyboardConstants { ] static let letterKeysPad = [ - ["q", "w", "e", "r", "t", "z", "u", "i", "o", "p", "delete"], + ["1", "2", "3", "4", "5", "6", "7", "8", "9", "0","-", "=", "delete"], + ["q", "w", "e", "r", "t", "z", "u", "i", "o", "p"], ["a", "s", "d", "f", "g", "h", "j", "k", "l", "ñ", "return"], ["shift", "y", "x", "c", "v", "b", "n", "m", ",", ".", "shift"], ["selectKeyboard", ".?123", "space", ".?123", "hideKeyboard"], // "undoArrow" @@ -81,10 +82,16 @@ func getESKeys() { letterKeys = SpanishKeyboardConstants.letterKeysPad numberKeys = SpanishKeyboardConstants.numberKeysPad symbolKeys = SpanishKeyboardConstants.symbolKeysPad + + //if the ipad is too samll for numbers + letterKeys.removeFirst(1) + letterKeys[0].append("delete") + allKeys = Array(letterKeys.joined()) + Array(numberKeys.joined()) + Array(symbolKeys.joined()) leftKeyChars = ["q", "a", "1", "@", "€"] - rightKeyChars = [] + // TODO: add "p" to rightKeyChar if has 4 rows + rightKeyChars = [""] centralKeyChars = allKeys.filter { !leftKeyChars.contains($0) && !rightKeyChars.contains($0) } } diff --git a/Keyboards/LanguageKeyboards/Swedish/SVInterfaceVariables.swift b/Keyboards/LanguageKeyboards/Swedish/SVInterfaceVariables.swift index 37591839..915b694e 100644 --- a/Keyboards/LanguageKeyboards/Swedish/SVInterfaceVariables.swift +++ b/Keyboards/LanguageKeyboards/Swedish/SVInterfaceVariables.swift @@ -30,7 +30,8 @@ public enum SwedishKeyboardConstants { ] static let letterKeysPad = [ - ["q", "w", "e", "r", "t", "z", "u", "i", "o", "p", "å", "delete"], + ["1", "2", "3", "4", "5", "6", "7", "8", "9", "0","-", "=", "delete"], + ["q", "w", "e", "r", "t", "z", "u", "i", "o", "p", "å"], ["a", "s", "d", "f", "g", "h", "j", "k", "l", "ö", "ä", "return"], ["shift", "y", "x", "c", "v", "b", "n", "m", ",", ".", "-", "shift"], ["selectKeyboard", ".?123", "space", ".?123", "hideKeyboard"], // "undoArrow" @@ -82,10 +83,16 @@ func getSVKeys() { letterKeys = SwedishKeyboardConstants.letterKeysPad numberKeys = SwedishKeyboardConstants.numberKeysPad symbolKeys = SwedishKeyboardConstants.symbolKeysPad + + //if the ipad is too samll for numbers + letterKeys.removeFirst(1) + letterKeys[0].append("delete") + allKeys = Array(letterKeys.joined()) + Array(numberKeys.joined()) + Array(symbolKeys.joined()) leftKeyChars = ["q", "a", "1", "@", "€"] rightKeyChars = [] + // TODO: add "å" to rightKeyChar if has 4 rows centralKeyChars = allKeys.filter { !leftKeyChars.contains($0) && !rightKeyChars.contains($0) } }