Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Migrate to new HardwareKeyboard class #17

Closed
shidenggui opened this issue Aug 26, 2022 · 1 comment
Closed

Migrate to new HardwareKeyboard class #17

shidenggui opened this issue Aug 26, 2022 · 1 comment

Comments

@shidenggui
Copy link

shidenggui commented Aug 26, 2022

hotkey_manger now use the depreacted RawKeyboard class, the new class is HardwareKeyboard page.

And I found some bugs about RawKeyboard that official has said below:

Compared to RawKeyboard
RawKeyboard is the legacy API, and will be deprecated and removed in the future. It is recommended to always use HardwareKeyboard and KeyEvent APIs (such as FocusNode.onKeyEvent) to handle key events.

Behavior-wise, RawKeyboard provides a less unified, less regular event model than HardwareKeyboard. For example:

  • Down events might not be matched with an up event, and vice versa (the set of pressed keys is silently updated).
  • The logical key of the down event might not be the same as that of the up event.
  • Down events and repeat events are not easily distinguishable (must be tracked manually).
  • Lock modes (such as CapsLock) only have their "enabled" state recorded. There's no way to acquire their pressing state.
@shidenggui shidenggui changed the title Migrate to new HardwareKeyboard Api Migrate to new HardwareKeyboard class Aug 26, 2022
@lijy91
Copy link
Member

lijy91 commented Mar 2, 2024

Migrated, Please upgrade to v0.2.0

@lijy91 lijy91 closed this as completed Mar 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants