Skip to content

Commit

Permalink
Merge pull request #511 from christianbilodeau/T509/set_right_popup_l…
Browse files Browse the repository at this point in the history
…eft_right_keys

[iPad] Set correct popup for left and right keys
  • Loading branch information
andrewtavis authored Nov 12, 2024
2 parents 9129e1b + 227f133 commit 816435e
Show file tree
Hide file tree
Showing 8 changed files with 32 additions and 26 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -174,6 +174,8 @@ func getENKeys() {
letterKeys = EnglishKeyboardProvider.genPadExpandedLetterKeys()
symbolKeys = EnglishKeyboardProvider.genPadExpandedSymbolKeys()

leftKeyChars = ["~", "`"]
rightKeyChars = ["\\", "°"]
allKeys = Array(letterKeys.joined()) + Array(symbolKeys.joined())
} else {
letterKeys = EnglishKeyboardProvider.genPadLetterKeys()
Expand All @@ -182,12 +184,11 @@ func getENKeys() {

letterKeys.removeFirst(1)

leftKeyChars = ["q", "1"]
rightKeyChars = []
allKeys = Array(letterKeys.joined()) + Array(numberKeys.joined()) + Array(symbolKeys.joined())
}

leftKeyChars = ["q", "1"]
// TODO: add "p" to rightKeyChar if the keyboard 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 @@ -171,6 +171,8 @@ func getFRKeys() {
letterKeys = FrenchKeyboardProvider.genPadExpandedLetterKeys()
symbolKeys = FrenchKeyboardProvider.genPadExpandedSymbolKeys()

leftKeyChars = ["@", "`"]
rightKeyChars = ["*"]
allKeys = Array(letterKeys.joined()) + Array(symbolKeys.joined())
} else {
letterKeys = FrenchKeyboardProvider.genPadLetterKeys()
Expand All @@ -179,12 +181,11 @@ func getFRKeys() {

letterKeys.removeFirst(1)

leftKeyChars = ["q", "a", "1", "@", "~"]
rightKeyChars = []
allKeys = Array(letterKeys.joined()) + Array(numberKeys.joined()) + Array(symbolKeys.joined())
}

leftKeyChars = ["q", "a", "1", "@", "~"]
// TODO: add "p" to rightKeyChar if the keyboard has 4 rows.
rightKeyChars = []
centralKeyChars = allKeys.filter { !leftKeyChars.contains($0) && !rightKeyChars.contains($0) }
}

Expand Down
9 changes: 4 additions & 5 deletions Keyboards/LanguageKeyboards/German/DEInterfaceVariables.swift
Original file line number Diff line number Diff line change
Expand Up @@ -217,7 +217,8 @@ func getDEKeys() {
letterKeys = GermanKeyboardProvider.genPadExpandedLetterKeys()
}
symbolKeys = GermanKeyboardProvider.genPadExpandedSymbolKeys()

leftKeyChars = ["^", "`"]
rightKeyChars = ["*"]
allKeys = Array(letterKeys.joined()) + Array(symbolKeys.joined())
} else {
if userDefaults.bool(forKey: "deAccentCharacters") {
Expand All @@ -229,13 +230,11 @@ func getDEKeys() {
symbolKeys = GermanKeyboardProvider.genPadSymbolKeys(currencyKeys: currencyKeys)

letterKeys.removeFirst(1)

leftKeyChars = ["q", "a", "1", "\"", "$"]
rightKeyChars = []
allKeys = Array(letterKeys.joined()) + Array(numberKeys.joined()) + Array(symbolKeys.joined())
}

leftKeyChars = ["q", "a", "1", "\"", "$"]
// TODO: add "ü" to rightKeyChar if the keyboard 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 @@ -171,6 +171,8 @@ func getITKeys() {
letterKeys = ItalianKeyboardProvider.genPadExpandedLetterKeys()
symbolKeys = ItalianKeyboardProvider.genPadExpandedSymbolKeys()

leftKeyChars = ["\\", "`"]
rightKeyChars = ["*", "§"]
allKeys = Array(letterKeys.joined()) + Array(symbolKeys.joined())
} else {
letterKeys = ItalianKeyboardProvider.genPadLetterKeys()
Expand All @@ -179,12 +181,11 @@ func getITKeys() {

letterKeys.removeFirst(1)

leftKeyChars = ["q", "1"]
rightKeyChars = []
allKeys = Array(letterKeys.joined()) + Array(numberKeys.joined()) + Array(symbolKeys.joined())
}

leftKeyChars = ["q", "1"]
// TODO: add "p" to rightKeyChar if the keyboard 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 @@ -170,6 +170,8 @@ func getPTKeys() {
letterKeys = PortugueseKeyboardProvider.genPadExpandedLetterKeys()
symbolKeys = PortugueseKeyboardProvider.genPadExpandedSymbolKeys()

leftKeyChars = ["~", "`"]
rightKeyChars = ["\\", "~"]
allKeys = Array(letterKeys.joined()) + Array(symbolKeys.joined())
} else {
letterKeys = PortugueseKeyboardProvider.genPadLetterKeys()
Expand All @@ -178,12 +180,11 @@ func getPTKeys() {

letterKeys.removeFirst(1)

leftKeyChars = ["q", "1", "$"]
rightKeyChars = []
allKeys = Array(letterKeys.joined()) + Array(numberKeys.joined()) + Array(symbolKeys.joined())
}

leftKeyChars = ["q", "1"]
// TODO: add "p" to rightKeyChar if the keyboard 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 @@ -165,6 +165,8 @@ func getRUKeys() {
letterKeys = RussianKeyboardProvider.genPadExpandedLetterKeys()
symbolKeys = RussianKeyboardProvider.genPadExpandedSymbolKeys()

leftKeyChars = ["§", "`"]
rightKeyChars = ["+", ""]
allKeys = Array(letterKeys.joined()) + Array(symbolKeys.joined())
} else {
letterKeys = RussianKeyboardProvider.genPadLetterKeys()
Expand All @@ -173,12 +175,11 @@ func getRUKeys() {

letterKeys.removeFirst(1)

leftKeyChars = ["й", "ф", "1", "@", "$"]
rightKeyChars = []
allKeys = Array(letterKeys.joined()) + Array(numberKeys.joined()) + Array(symbolKeys.joined())
}

leftKeyChars = ["й", "ф", "1", "@", "$"]
// TODO: add "х" to rightKeyChar if the keyboard 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 @@ -214,6 +214,8 @@ func getESKeys() {
}
symbolKeys = SpanishKeyboardProvider.genPadExpandedSymbolKeys()

leftKeyChars = ["|", "`"]
rightKeyChars = ["*", "§"]
allKeys = Array(letterKeys.joined()) + Array(symbolKeys.joined())
} else {
if userDefaults.bool(forKey: "esAccentCharacters") {
Expand All @@ -226,12 +228,11 @@ func getESKeys() {

letterKeys.removeFirst(1)

leftKeyChars = ["q", "a", "1", "@", ""]
rightKeyChars = []
allKeys = Array(letterKeys.joined()) + Array(numberKeys.joined()) + Array(symbolKeys.joined())
}

leftKeyChars = ["q", "a", "1", "@", ""]
// TODO: add "p" to rightKeyChar if the keyboard 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 @@ -221,6 +221,8 @@ func getSVKeys() {
}
symbolKeys = SwedishKeyboardProvider.genPadExpandedSymbolKeys()

leftKeyChars = ["§", "`"]
rightKeyChars = ["§", "*"]
allKeys = Array(letterKeys.joined()) + Array(symbolKeys.joined())
} else {
if userDefaults.bool(forKey: "svAccentCharacters") {
Expand All @@ -233,12 +235,11 @@ func getSVKeys() {

letterKeys.removeFirst(1)

leftKeyChars = ["q", "a", "1", "@", ""]
rightKeyChars = []
allKeys = Array(letterKeys.joined()) + Array(numberKeys.joined()) + Array(symbolKeys.joined())
}

leftKeyChars = ["q", "a", "1", "@", ""]
// TODO: add "å" to rightKeyChar if the keyboard has 4 rows.
rightKeyChars = []
centralKeyChars = allKeys.filter { !leftKeyChars.contains($0) && !rightKeyChars.contains($0) }
}

Expand Down

0 comments on commit 816435e

Please sign in to comment.