diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index c051667..f0a31b9 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -22,7 +22,6 @@ jobs: - uses: bluefireteam/melos-action@v3 - working-directory: ./packages/hotkey_manager/example run: | - melos bs flutter build linux --release build-macos: @@ -36,7 +35,6 @@ jobs: - uses: bluefireteam/melos-action@v3 - working-directory: ./packages/hotkey_manager/example run: | - melos bs flutter build macos --release build-web: @@ -50,7 +48,6 @@ jobs: - uses: bluefireteam/melos-action@v3 - working-directory: ./packages/hotkey_manager/example run: | - melos bs flutter build web --release build-windows: @@ -64,5 +61,4 @@ jobs: - uses: bluefireteam/melos-action@v3 - working-directory: ./packages/hotkey_manager/example run: | - melos bs flutter build windows --release 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