mirror of
https://github.com/Helium314/HeliBoard.git
synced 2025-04-23 15:49:09 +00:00
parent
2e9ba954ad
commit
1c955a34b2
1 changed files with 6 additions and 1 deletions
|
@ -301,6 +301,8 @@ sealed interface KeyData : AbstractKeyData {
|
|||
// idea: directly create PopupKeySpec, but need to deal with needsToUpcase and popupKeysColumnAndFlags
|
||||
fun getPopupLabel(params: KeyboardParams): String {
|
||||
val newLabel = processLabel(params)
|
||||
if (newLabel == "!")
|
||||
Log.w("test", "code $code, newCode ${processCode()}")
|
||||
if (code == KeyCode.UNSPECIFIED) {
|
||||
if (newLabel == label) return label
|
||||
val newCode = processCode()
|
||||
|
@ -315,11 +317,14 @@ sealed interface KeyData : AbstractKeyData {
|
|||
return "${newLabel.substringBefore("|")}|${StringUtils.newSingleCodePointString(code)}"
|
||||
}
|
||||
return "$newLabel|${StringUtils.newSingleCodePointString(code)}"
|
||||
|
||||
}
|
||||
if (code in KeyCode.Spec.CURRENCY) {
|
||||
return getCurrencyLabel(params)
|
||||
}
|
||||
if (code == KeyCode.MULTIPLE_CODE_POINTS && this is MultiTextKeyData) {
|
||||
val outputText = String(codePoints, 0, codePoints.size)
|
||||
return "${newLabel}|$outputText"
|
||||
}
|
||||
return if (newLabel.endsWith("|")) "$newLabel!code/${processCode()}" // for toolbar keys
|
||||
else "$newLabel|!code/${processCode()}"
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue