Fix errors in CZProgrammerMessagEase (#932)

* Fix crash when ˇtyped

* Fix missing arrow down

* Fix missing }

* Trailing whitespace

* One more space trailing
This commit is contained in:
Ondřej Chwiedziuk 2024-05-30 20:15:59 +02:00 committed by GitHub
parent 36c43efd66
commit 0a0bb99ed9
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 40 additions and 16 deletions

View File

@ -172,13 +172,13 @@ val KB_CZ_PROG_MAIN =
SwipeDirection.TOP_RIGHT to
KeyC(
display = KeyDisplay.TextDisplay("¨"),
action = KeyAction.ComposeLastKey("¨"),
action = KeyAction.ComposeLastKey("\""),
color = ColorVariant.MUTED,
),
SwipeDirection.BOTTOM_RIGHT to
KeyC(
display = KeyDisplay.TextDisplay("´"),
action = KeyAction.ComposeLastKey("´"),
action = KeyAction.ComposeLastKey("'"),
color = ColorVariant.MUTED,
),
),
@ -349,12 +349,6 @@ val KB_CZ_PROG_MAIN =
action = KeyAction.CommitText("@"),
color = ColorVariant.MUTED,
),
SwipeDirection.BOTTOM to
KeyC(
display = KeyDisplay.TextDisplay("|"),
action = KeyAction.CommitText("|"),
color = ColorVariant.MUTED,
),
),
),
NUMERIC_KEY_ITEM,
@ -399,6 +393,12 @@ val KB_CZ_PROG_MAIN =
action = KeyAction.CommitText("*"),
color = ColorVariant.MUTED,
),
SwipeDirection.BOTTOM to
KeyC(
display = KeyDisplay.TextDisplay("|"),
action = KeyAction.CommitText("|"),
color = ColorVariant.MUTED,
),
),
),
KeyItemC(
@ -675,13 +675,13 @@ val KB_CZ_PROG_SHIFTED =
SwipeDirection.TOP_RIGHT to
KeyC(
display = KeyDisplay.TextDisplay("¨"),
action = KeyAction.ComposeLastKey("¨"),
action = KeyAction.ComposeLastKey("\""),
color = ColorVariant.MUTED,
),
SwipeDirection.BOTTOM_RIGHT to
KeyC(
display = KeyDisplay.TextDisplay("´"),
action = KeyAction.ComposeLastKey("´"),
action = KeyAction.ComposeLastKey("'"),
color = ColorVariant.MUTED,
),
),
@ -859,12 +859,6 @@ val KB_CZ_PROG_SHIFTED =
action = KeyAction.CommitText("@"),
color = ColorVariant.MUTED,
),
SwipeDirection.BOTTOM to
KeyC(
display = KeyDisplay.TextDisplay("|"),
action = KeyAction.CommitText("|"),
color = ColorVariant.MUTED,
),
),
),
NUMERIC_KEY_ITEM,
@ -909,6 +903,12 @@ val KB_CZ_PROG_SHIFTED =
action = KeyAction.CommitText("*"),
color = ColorVariant.MUTED,
),
SwipeDirection.BOTTOM to
KeyC(
display = KeyDisplay.TextDisplay("|"),
action = KeyAction.CommitText("|"),
color = ColorVariant.MUTED,
),
),
),
KeyItemC(

View File

@ -800,6 +800,30 @@ fun performKeyAction(
else -> textBefore
}
"ˇ" ->
when (textBefore) {
"c" -> "č"
"d" -> "ď"
"e" -> "ě"
"l" -> "ľ"
"n" -> "ň"
"r" -> "ř"
"s" -> "š"
"t" -> "ť"
"z" -> "ž"
"C" -> "Č"
"D" -> "Ď"
"E" -> "Ě"
"L" -> "Ľ"
"N" -> "Ň"
"R" -> "Ř"
"S" -> "Š"
"T" -> "Ť"
"Z" -> "Ž"
" " -> "ˇ"
else -> textBefore
}
else -> throw IllegalStateException("Invalid key modifier")
}