Skip to content

Commit

Permalink
Merge pull request #295 from neisenlo/iPadKeyboard
Browse files Browse the repository at this point in the history
Implemented and ignored number key row for ipad.
  • Loading branch information
andrewtavis authored Apr 22, 2023
2 parents 94492d2 + 29e0613 commit cceb80e
Show file tree
Hide file tree
Showing 9 changed files with 72 additions and 10 deletions.
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

0 comments on commit cceb80e

Please sign in to comment.