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

[iPad] Set correct popup for left and right keys #511

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
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
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
Loading