Skip to content

Commit b35d43a

Browse files
committed
fix: workaround for some text pattern cannot be simulated as key sequence
1 parent ec7957a commit b35d43a

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

app/src/main/java/com/osfans/trime/ime/keyboard/KeyAction.kt

+1-2
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ class KeyAction(
9393
init {
9494
val unbraced = raw.removeSurrounding("{", "}")
9595
// match like: { x: "{Control+a}" }
96-
if (raw.matches(SINGLE_BRACED_STR)) {
96+
if (raw.matches(BRACED_STR)) {
9797
val (c, m) = Keycode.parseSend(unbraced)
9898
if (c != KeyEvent.KEYCODE_UNKNOWN || m > 0) {
9999
code = c
@@ -177,7 +177,6 @@ class KeyAction(
177177
}
178178

179179
companion object {
180-
private val SINGLE_BRACED_STR = Regex("""^\{[^{}]+\}$""")
181180
private val BRACED_STR = Regex("""\{[^{}]+\}""")
182181
private val KV_PATTERN = Regex("""(\\w+)=(\\w+)""")
183182

0 commit comments

Comments
 (0)