From 932602b10aa58bca4c50e103d0614f737d0c505a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=8E=E5=81=A5=E8=8E=B9?= Date: Sat, 2 Mar 2024 16:26:47 +0800 Subject: [PATCH] v0.2.0 --- README-ZH.md | 16 +++------------- README.md | 16 +++------------- packages/hotkey_manager/CHANGELOG.md | 7 +++++-- 3 files changed, 11 insertions(+), 28 deletions(-) diff --git a/README-ZH.md b/README-ZH.md index 06def74..4efc28b 100644 --- a/README-ZH.md +++ b/README-ZH.md @@ -49,17 +49,7 @@ ```yaml dependencies: - hotkey_manager: ^0.1.7 -``` - -或 - -```yaml -dependencies: - hotkey_manager: - git: - url: https://github.com/leanflutter/hotkey_manager.git - ref: main + hotkey_manager: ^0.2.0 ``` #### Linux requirements @@ -92,8 +82,8 @@ void main() async { ```dart // ⌥ + Q HotKey _hotKey = HotKey( - KeyCode.keyQ, - modifiers: [KeyModifier.alt], + key: PhysicalKeyboardKey.keyQ, + modifiers: [HotKeyModifier.alt], // 设置热键范围(默认为 HotKeyScope.system) scope: HotKeyScope.inapp, // 设置为应用范围的热键。 ); diff --git a/README.md b/README.md index d520ceb..a5b2fae 100644 --- a/README.md +++ b/README.md @@ -49,17 +49,7 @@ Add this to your package's pubspec.yaml file: ```yaml dependencies: - hotkey_manager: ^0.1.7 -``` - -Or - -```yaml -dependencies: - hotkey_manager: - git: - url: https://github.com/leanflutter/hotkey_manager.git - ref: main + hotkey_manager: ^0.2.0 ``` #### Linux requirements @@ -92,8 +82,8 @@ Register/Unregsiter a system/inapp wide hotkey. ```dart // ⌥ + Q HotKey _hotKey = HotKey( - KeyCode.keyQ, - modifiers: [KeyModifier.alt], + key: PhysicalKeyboardKey.keyQ, + modifiers: [HotKeyModifier.alt], // Set hotkey scope (default is HotKeyScope.system) scope: HotKeyScope.inapp, // Set as inapp-wide hotkey. ); diff --git a/packages/hotkey_manager/CHANGELOG.md b/packages/hotkey_manager/CHANGELOG.md index 1534af3..7c73a12 100644 --- a/packages/hotkey_manager/CHANGELOG.md +++ b/packages/hotkey_manager/CHANGELOG.md @@ -1,8 +1,11 @@ -## 0.1.8 +## 0.2.0 +* feat: Convert to federated plugin +* feat: Use flutter built-in keymap (provided through the `uni_platform` package) +* chore: Use `HardwareKeyboard` to replace the `RawKeyboard` api +* bump flutter to 3.19.2 * fix: crash if toString called with null modifiers (#25) * Update dependencies & add three keys (#28) -* bump flutter to 3.10.2 ## 0.1.7