diff --git a/app/src/main/java/com/osfans/trime/ime/keyboard/CommonKeyboardActionListener.kt b/app/src/main/java/com/osfans/trime/ime/keyboard/CommonKeyboardActionListener.kt index a187c89a48..de9cf58e3f 100644 --- a/app/src/main/java/com/osfans/trime/ime/keyboard/CommonKeyboardActionListener.kt +++ b/app/src/main/java/com/osfans/trime/ime/keyboard/CommonKeyboardActionListener.kt @@ -297,6 +297,15 @@ class CommonKeyboardActionListener( when (keyEventCode) { KeyEvent.KEYCODE_BACK -> service.requestHideSelf(0) + else -> { + // 小键盘自动增加锁定 + if (keyEventCode in KeyEvent.KEYCODE_NUMPAD_0..KeyEvent.KEYCODE_NUMPAD_EQUALS) { + service.sendDownUpKeyEvent( + keyEventCode, + metaState or KeyEvent.META_NUM_LOCK_ON, + ) + } + } } } }