Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implemented and ignored number key row for ipad. #295

Merged
merged 1 commit into from
Apr 22, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 8 additions & 1 deletion Keyboards/KeyboardsBase/InterfaceVariables.swift
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down Expand Up @@ -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) }
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down Expand Up @@ -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) }
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down Expand Up @@ -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", "@", "~"]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down Expand Up @@ -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) }
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down Expand Up @@ -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) }
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down Expand Up @@ -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) }
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down Expand Up @@ -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) }
}

Expand Down
11 changes: 9 additions & 2 deletions Keyboards/LanguageKeyboards/Spanish/ESInterfaceVariables.swift
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down Expand Up @@ -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) }
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down Expand Up @@ -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) }
}

Expand Down