mirror of
https://github.com/tauri-apps/plugins-workspace.git
synced 2026-08-09 18:36:03 +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>
487 B
487 B
global-shortcut
| global-shortcut |
|---|
| patch |
Breaking change Refactored the plugin Rust APIs for better DX and flexibility:
- Changed
Builder::with_handlerto 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_shortcutandBuilder::with_shortcutsto register shortcuts on the plugin builder. - Added
on_shortcutandon_all_shortcutsto register shortcuts with a handler.