keymap
0.0.92, released 3 years ago by mutisya.dev
Keyboard shortcuts widget with help overlay and markdown support
What it does
It lets developers add keyboard shortcuts to any widget tree and provides a help screen overlay that lists the shortcuts. The overlay supports rich text via Markdown and adapts to the app theme.
AI-written summary of version 0.0.92, based on the package's README and metadata. Report an inaccuracy
Use it when
- You need global keyboard shortcuts in a Flutter app
- You want a built‑in help screen for shortcuts
- You need support for mobile keyboards or web
Skip it when
- You need a stable, production‑ready package
- You require advanced keybinding features like modifiers combinations beyond basic control/alt
Strengths
- Easy to integrate with a single widget
- Markdown support for rich help text
- Theme‑aware colors and fonts
- Works on mobile, web, desktop
Weaknesses
- Pre‑alpha, API may change
- Limited documentation on advanced use cases
- No support for complex key combinations yet
Setup
- Kind
- Flutter widgets
- Effort
- Low
- Code generation
- No
- Direct dependencies
- 1
```dart
return KeyboardWidget(
bindings: [
KeyAction.fromString('A','increment the counter', () { setState(() => count++); }, isControlPressed: true),
KeyAction(LogicalKeyboardKey.keyD, 'decrement the counter', () { setState(() => count--); }, isAltPressed: true, isControlPressed: true),
],
child: Column(
children: [
const Text('Up arrow for adding, down arrow to subtract'),
Text('count: $count'),
],
),
);
```Alternatives
Packages that do the same job and could replace keymap.
- dpad
D-pad navigation and focus management for Flutter TV apps.
77Compare - keyboard_visibility_pro
Detects soft-keyboard open and close status in Flutter applications.
39Compare - command_palette
A Flutter widget that shows a command palette similar to VS Code or Slack.
44Compare - numeric_keyboard
A simple numeric keyboard widget for Flutter.
50Compare