Skip to content

Commit

Permalink
fix: workaround for some text pattern cannot be simulated as key sequ…
Browse files Browse the repository at this point in the history
…ence
  • Loading branch information
WhiredPlanck committed Nov 28, 2024
1 parent ec7957a commit b35d43a
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions app/src/main/java/com/osfans/trime/ime/keyboard/KeyAction.kt
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ class KeyAction(
init {
val unbraced = raw.removeSurrounding("{", "}")
// match like: { x: "{Control+a}" }
if (raw.matches(SINGLE_BRACED_STR)) {
if (raw.matches(BRACED_STR)) {
val (c, m) = Keycode.parseSend(unbraced)
if (c != KeyEvent.KEYCODE_UNKNOWN || m > 0) {
code = c
Expand Down Expand Up @@ -177,7 +177,6 @@ class KeyAction(
}

companion object {
private val SINGLE_BRACED_STR = Regex("""^\{[^{}]+\}$""")
private val BRACED_STR = Regex("""\{[^{}]+\}""")
private val KV_PATTERN = Regex("""(\\w+)=(\\w+)""")

Expand Down

0 comments on commit b35d43a

Please sign in to comment.