super_hot_key
0.9.1, released a year ago by nativeshell.dev
Register global system-wide hot keys on macOS and Windows.
What it does
Allows Flutter desktop applications to register global hot keys that trigger callbacks even when the application is not in focus. It is supported on macOS and Windows and uses physical keyboard keys for definitions.
AI-written summary of version 0.9.1, based on the package's README and metadata. Report an inaccuracy
Use it when
- You are building a desktop application for macOS or Windows that requires global keyboard shortcuts.
- You need keyboard shortcuts to trigger actions even when your app is running in the background.
Skip it when
- You only need in-app keyboard shortcuts handled by standard Flutter focus nodes.
- You are targeting mobile or web platforms.
Strengths
- Enables system-wide global hot keys on macOS and Windows.
- Simple API to create and dispose hot keys.
Weaknesses
- Only supports macOS and Windows platforms.
- Not documented for platforms other than macOS and Windows.
Setup
- Kind
- Flutter widgets
- Effort
- Low
- Code generation
- No
- Direct dependencies
- 2
not documented
final hotKey = await HotKey.create(
definition: HotKeyDefinition(
key: PhysicalKeyboardKey.minus,
alt: true,
meta: true,
),
callback: () {
print('hot key pressed');
},
);
hotKey.dispose();Alternatives
Packages that do the same job and could replace super_hot_key.
- tray_manager
Define system tray icons and context menus in Flutter desktop apps.
93Compare - xdg_desktop_portal
A native Dart implementation of portals for Linux desktop applications.
75Compare - snapd
A Dart client for communicating with the snapd daemon on Linux systems.
74Compare - screen_capturer
Allows Flutter desktop apps to take screenshots.
50Compare
Works with
Packages commonly used together with super_hot_key: ones it builds on, ones built on it, and its own family.
- super_native_extensionssuper_hot_key depends on itLow level interface for native APIs such as clipboard and Drag and Drop
- super_keyboard_layoutsuper_hot_key depends on itKeyboard layout mapping and layout change notifications for Flutter applications.
- super_clipboardSame familyComprehensive clipboard access package supporting rich text, images, and custom data formats.
- super_drag_and_dropSame familyNative drag and drop for Flutter across desktop, mobile and web.
- super_context_menuSame familyContext menu widget supporting native menus on platforms and drag & drop transitions on mobile.