mirror of
https://github.com/cocos/cocos4.git
synced 2026-11-21 16:12:40 +08:00
fix keyboard event listening on mobile (#9935)
* fix keyboard event listening on mobile * update deprecation info
This commit is contained in:
@@ -47,7 +47,7 @@ const KEY = {
|
||||
* @en The back key on mobile phone
|
||||
* @zh 移动端返回键
|
||||
* @readonly
|
||||
* @deprecated since v3.3
|
||||
* @deprecated since v3.3, please use KeyCode.MOBILE_BACK instead.
|
||||
*/
|
||||
back: 6,
|
||||
/**
|
||||
|
||||
@@ -9,6 +9,12 @@ export enum KeyCode {
|
||||
*/
|
||||
NONE = 0,
|
||||
|
||||
/**
|
||||
* @en The back key on mobile phone
|
||||
* @zh 移动端返回键
|
||||
*/
|
||||
MOBILE_BACK = 6,
|
||||
|
||||
/**
|
||||
* @en The backspace key
|
||||
* @zh 退格键
|
||||
|
||||
@@ -83,7 +83,7 @@ class SystemInfo extends EventTarget {
|
||||
[Feature.SAFE_AREA]: this.isMobile,
|
||||
|
||||
[Feature.INPUT_TOUCH]: this.isMobile,
|
||||
[Feature.EVENT_KEYBOARD]: !this.isMobile,
|
||||
[Feature.EVENT_KEYBOARD]: true,
|
||||
[Feature.EVENT_MOUSE]: !this.isMobile,
|
||||
[Feature.EVENT_TOUCH]: true,
|
||||
[Feature.EVENT_ACCELEROMETER]: this.isMobile,
|
||||
|
||||
Reference in New Issue
Block a user