keycaps 0.1.0
keycaps: ^0.1.0 copied to clipboard
Keycap and keyboard-shortcut widgets for Flutter. Draws ⌘⇧P or Ctrl+Shift+P from a string, a LogicalKeyboardKey or a ShortcutActivator, themed and labelled per platform.
0.1.0 #
Initial release.
Keycap— one key, from a literal label, aLogicalKeyboardKey, or any widget.Keycaps— a chord, from a string (Cmd+Shift+P), explicitKeyTokens, or aSingleActivator/CharacterActivator.KeycapSequence— chords pressed one after another (Ctrl+KthenCtrl+S).- Platform-aware labels:
⌘ ⌥ ⌃ ⇧on Apple,Win/Ctrl/Alton Windows,Superon Linux — including conventional modifier ordering. KeycapTheme/KeycapThemeData/KeycapStyle, four variants (raised, flat, outlined, bare) and three size presets.- Phosphor icons for keys a picture says better: the OS logo on the meta key and
the arrow keys by default, every modifier under
KeycapIcons.always.KeycapIconFontGuardkeeps the unused Phosphor weights from shipping whole. - Caps sink when tapped (
onTap,Keycaps.onKeyTap), and light up while their key is held on the device — one sharedHardwareKeyboardhandler that never swallows an event. - Screen readers hear words (
Command Shift P), not glyphs.
