mirror of
https://github.com/Helium314/HeliBoard.git
synced 2025-06-10 00:27:45 +00:00
fix #881 and improve related tests
This commit is contained in:
parent
4ab7e8b78e
commit
9efb22bd0c
2 changed files with 31 additions and 28 deletions
|
@ -298,9 +298,10 @@ sealed interface KeyData : AbstractKeyData {
|
|||
fun getPopupLabel(params: KeyboardParams): String {
|
||||
val newLabel = processLabel(params)
|
||||
if (code == KeyCode.UNSPECIFIED) {
|
||||
return if (newLabel == label) label
|
||||
else if (newLabel.endsWith("|")) "${newLabel}!code/${processCode()}" // for toolbar keys
|
||||
else "${newLabel}|!code/${processCode()}"
|
||||
if (newLabel == label) return label
|
||||
val newCode = processCode()
|
||||
if (newLabel.endsWith("|")) return "${newLabel}!code/$newCode" // for toolbar keys
|
||||
return if (newCode == code) newLabel else "${newLabel}|!code/$newCode"
|
||||
}
|
||||
if (code >= 32)
|
||||
return "${newLabel}|${StringUtils.newSingleCodePointString(code)}"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue