galactic_hotkeys 1.0.0 copy "galactic_hotkeys: ^1.0.0" to clipboard
galactic_hotkeys: ^1.0.0 copied to clipboard

Galactic Hotkeys is a robust Flutter package for streamlined keyboard shortcuts in your apps. Inspired by the cosmos.

Galactic Hotkeys #

A Flutter package that simplifies the implementation of keyboard shortcuts in your Flutter applications.

Usage #

To use Galactic Hotkeys, wrap your main widget with the GalacticHotkeys widget and provide the desired shortcuts and a callback function to handle when a shortcut is pressed.

GalacticHotkeys<String>(
  shortcuts: {
    'Save': [
      [LogicalKeyboardKey.controlLeft, LogicalKeyboardKey.keyS],
      [LogicalKeyboardKey.metaLeft, LogicalKeyboardKey.keyS],
    ],
    'Copy': [
      [LogicalKeyboardKey.controlLeft, LogicalKeyboardKey.keyC],
      [LogicalKeyboardKey.metaLeft, LogicalKeyboardKey.keyC],
    ],
    // Add more shortcuts as needed
  },
  onShortcutPressed: (String identifier) {
    // Handle the shortcut press
    print('Shortcut pressed: $identifier');
  },
  child: const Container(),
)

In this example, the GalacticHotkeys widget is used to capture keyboard shortcuts and trigger the onShortcutPressed callback with the corresponding identifier.

License #

This project is licensed under the BSD 3-Clause License.

1
likes
0
pub points
29%
popularity

Publisher

verified publishercosmos-in-code.com

Galactic Hotkeys is a robust Flutter package for streamlined keyboard shortcuts in your apps. Inspired by the cosmos.

Repository (GitHub)
View/report issues

License

unknown (license)

Dependencies

flutter

More

Packages that depend on galactic_hotkeys