leanflutter/hotkey_manager

KeyCode.backquote注册时空指针异常

ZXQ-Kyle opened this issue · 3 comments

环境:macos flutter sdk 3.0.1 hotkey_manager: ^0.1.7

HotKey(
KeyCode.backquote,
modifiers: [KeyModifier.control],
scope: HotKeyScope.system,
)
KeyCode.backquote报错,使用KeyCode.keyQ就不会
hotkey_manager/HotkeyManagerPlugin.swift:42: Fatal error: Unexpectedly found nil while unwrapping an Optional value

解决了,mac上backquote对应的是grave,自己做一下适配就行

我研究一下,看看是不是需要做个映射

v0.2.0 已经直接使用了 flutter 内置的 keymap 来获取 keycode,具体看这里 #32 (comment)