From 73b9219eb33a50810fe6ccda75b7297e5cb60d9e Mon Sep 17 00:00:00 2001 From: xuchang Date: Mon, 17 Feb 2025 11:37:02 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20ohos=E5=B9=B3=E5=8F=B0KeyEventHandler.et?= =?UTF-8?q?s=20initCharMap()=E8=A1=A5=E5=85=85=E5=B0=8F=E9=94=AE=E7=9B=98?= =?UTF-8?q?=E6=95=B0=E5=AD=97=E5=AD=97=E7=AC=A6=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: xuchang --- .../src/main/ets/embedding/ohos/KeyEventHandler.ets | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/shell/platform/ohos/flutter_embedding/flutter/src/main/ets/embedding/ohos/KeyEventHandler.ets b/shell/platform/ohos/flutter_embedding/flutter/src/main/ets/embedding/ohos/KeyEventHandler.ets index 0e7aaad8e8..69ea10bd50 100644 --- a/shell/platform/ohos/flutter_embedding/flutter/src/main/ets/embedding/ohos/KeyEventHandler.ets +++ b/shell/platform/ohos/flutter_embedding/flutter/src/main/ets/embedding/ohos/KeyEventHandler.ets @@ -82,6 +82,16 @@ export class KeyEventHandler { this.charMap.set(KeyCode.KEYCODE_PERIOD, '.') this.charMap.set(KeyCode.KEYCODE_SLASH, '/') this.charMap.set(KeyCode.KEYCODE_SPACE, ' ') + this.charMap.set(KeyCode.KEYCODE_NUMPAD_0, '0') + this.charMap.set(KeyCode.KEYCODE_NUMPAD_1, '1') + this.charMap.set(KeyCode.KEYCODE_NUMPAD_2, '2') + this.charMap.set(KeyCode.KEYCODE_NUMPAD_3, '3') + this.charMap.set(KeyCode.KEYCODE_NUMPAD_4, '4') + this.charMap.set(KeyCode.KEYCODE_NUMPAD_5, '5') + this.charMap.set(KeyCode.KEYCODE_NUMPAD_6, '6') + this.charMap.set(KeyCode.KEYCODE_NUMPAD_7, '7') + this.charMap.set(KeyCode.KEYCODE_NUMPAD_8, '8') + this.charMap.set(KeyCode.KEYCODE_NUMPAD_9, '9') } private initShiftMap() { -- Gitee