File tree Expand file tree Collapse file tree 1 file changed +5
-1
lines changed
app/src/main/java/com/osfans/trime/ime/keyboard Expand file tree Collapse file tree 1 file changed +5
-1
lines changed Original file line number Diff line number Diff line change @@ -92,22 +92,26 @@ class KeyAction(
9292
9393 init {
9494 val unbraced = raw.removeSurrounding(" {" , " }" )
95+ var handled = false
9596 // match like: { x: "{Control+a}" }
9697 if (raw.matches(BRACED_STR )) {
9798 val (c, m) = Keycode .parseSend(unbraced)
9899 if (c != KeyEvent .KEYCODE_UNKNOWN || m > 0 ) {
99100 code = c
100101 modifier = m
102+ handled = true
101103 } else {
102104 // match: { x: { commit: a, text: b, label: c } }
103105 val action = decodeMapFromString(raw)
104106 if (action.isNotEmpty()) {
105107 commit = action[" commit" ] ? : " "
106108 text = action[" text" ] ? : " "
107109 label = action[" label" ] ? : " "
110+ handled = true
108111 }
109112 }
110- } else {
113+ }
114+ if (! handled) {
111115 val theme = ThemeManager .activeTheme
112116 // match like: { x: BackSpace } -> preset_keys/BackSpace: {..., send: BackSpace }
113117 if (theme.presetKeys!! .containsKey(unbraced)) {
You can’t perform that action at this time.
0 commit comments