shortcut_atlas 0.1.0
shortcut_atlas: ^0.1.0 copied to clipboard
Enterprise keyboard shortcuts for Flutter desktop: bind keys to actions and reveal a contextual cheat-sheet HUD by holding Alt.
0.1.0 #
Initial release.
-
Remappable keybindings —
Keymaplayers factory < admin < user overrides with arevisionnotifier; re-bindings flow live to dispatch, the HUD, the palette, and the menu.KeyRecordercaptures a chord ("press a key to rebind"), and a pluggableKeymapStore(+ActivatorCodec) makes them persistent with no required dependency. -
Menu bar bridge —
ShortcutMenuBar/ShortcutMenubuild a MaterialMenuBarfrom the sameShortcutCommands. Items show each command's effective chord (display-only, so they never double-fire) and run the same behavior. -
HUD polish — a titled header and a footer that counts the shortcuts and points at the palette, plus
AtlasThemeData.minimal/.accentpresets alongside the default glass. -
Command palette (
Cmd/Ctrl+K) — a searchable, keyboard-navigable (↑/↓/Enter/Esc) overlay over the same command registry. Snapshots the active commands at open time, so it works even though it steals focus. -
Platform awareness —
AtlasPlatform(desktop/apple/web detection, the primary-modifier label, and a reserved-chord checker). The HUD and palette restrict to desktop/web by default (AtlasConfig.restrictToDesktop). -
Debug diagnostics — warns about duplicate activators in a scope and chords the OS/browser is likely to intercept.
-
ShortcutCommand/command()— one declarative descriptor (keys + label + group + behavior) that is the single source of truth for dispatch and the HUD. -
ShortcutScope— compiles commands into real FlutterShortcuts/Actions/Focus, so dispatch, precedence, and contextual enable/disable are the framework's job. -
ShortcutAtlas— root widget (install viaMaterialApp(builder:)) hosting the controller, the global command action, and the HUD overlay. -
Hold-Alt HUD — a contextual, translucent cheat-sheet revealed by holding Alt (peek-then-act), listing the shortcuts live for the focused screen.
-
PlatformActivator/primary()— Ctrl on Windows/Linux, Cmd on macOS, with per-OS glyph rendering (⌃⌥⇧⌘ vs Ctrl/Alt/Shift). -
Auto-guard — bare single-key shortcuts (e.g. tab nav via
1/2/3) are automatically disabled while a text field has focus, so typing still works. -
AtlasActionButton— a button whoseonPressedand a keyboard shortcut share oneIntent/Actionand one enablement gate. -
AtlasThemeData— theme the HUD via aThemeExtension. -
Testing seam:
AltHoldClock/FakeAltHoldClockfor deterministic HUD tests.