mirror of
https://github.com/tauri-apps/plugins-workspace.git
synced 2026-08-11 18:40:22 +02:00
* feat(global-shortcut): add `GlobalShortcutExt::register_with_handler` ref: https://github.com/tauri-apps/plugins-workspace/issues/965 * clippy * refactor apis to take closure by default * change file * Update .changes/global-shortcut-refactor.md Co-authored-by: Simon Hyll <hyllsimon@gmail.com> * Update global-shortcut-refactor.md * use option instead * clippy * update readme * on_shortcut and with_shortcut * map handler * simplify events * lint --------- Co-authored-by: Simon Hyll <hyllsimon@gmail.com> Co-authored-by: Lucas Nogueira <lucas@tauri.studio>
10 lines
487 B
Markdown
10 lines
487 B
Markdown
---
|
|
"global-shortcut": "patch"
|
|
---
|
|
|
|
**Breaking change** Refactored the plugin Rust APIs for better DX and flexibility:
|
|
|
|
- Changed `Builder::with_handler` to be a method instead of a static method, it will also be triggered for any and all shortcuts even if the shortcut is registered through JS.
|
|
- Added `Builder::with_shortcut` and `Builder::with_shortcuts` to register shortcuts on the plugin builder.
|
|
- Added `on_shortcut` and `on_all_shortcuts` to register shortcuts with a handler.
|