类EventMgr
事件管理器。
继承
属性
pointerCanvas
获取指针是否在画布之上。
方法
registerHotKey
typescript
registerHotKey(keys: KeyCode[], action: () => void): string;注册热键。
返回一个ID, string 类型。
参数
keys: KeyCode 数组
键。 KeyCode 数组类型。
action:() => void
动作, () => void 类型。
unRegisterHotKey
typescript
unRegisterHotKey(id: string): void;取消注册热键。
返回 void 类型。
参数
id:string
热键注册返回的ID。 string 类型。
isPressed
typescript
isPressed(key: KeyCode): boolean;是否按下了某个键。
返回 boolean 类型。
参数
key: KeyCode
键。 KeyCode 类型。
文档中心