File tree 1 file changed +16
-3
lines changed
app/src/main/java/com/osfans/trime/ime/keyboard
1 file changed +16
-3
lines changed Original file line number Diff line number Diff line change @@ -259,9 +259,22 @@ class CommonKeyboardActionListener(
259
259
}
260
260
}
261
261
}
262
- val currentModifier = KeyboardSwitcher .currentKeyboard.modifier
263
- val combinedModifiers = action.modifier or currentModifier
264
- onKey(action.code, if (action.modifier == 0 ) currentModifier else combinedModifiers)
262
+ val modifier =
263
+ when {
264
+ action.modifier == 0 -> KeyboardSwitcher .currentKeyboard.modifier
265
+ (action.modifier and KeyEvent .META_CTRL_ON ) != 0 -> {
266
+ when (action.code) {
267
+ in KeyEvent .KEYCODE_DPAD_UP .. KeyEvent .KEYCODE_DPAD_RIGHT ,
268
+ KeyEvent .KEYCODE_MOVE_HOME ,
269
+ KeyEvent .KEYCODE_MOVE_END ,
270
+ -> action.modifier or KeyboardSwitcher .currentKeyboard.modifier
271
+
272
+ else -> action.modifier
273
+ }
274
+ }
275
+ else -> action.modifier
276
+ }
277
+ onKey(action.code, modifier)
265
278
}
266
279
}
267
280
}
You can’t perform that action at this time.
0 commit comments