KeyboardDisplay constructor

const KeyboardDisplay({
  1. Key? key,
  2. required List<LogicalKeyboardKey> keys,
  3. double? spacing,
})

Creates a KeyboardDisplay from a list of keyboard keys.

Displays the specified keyboard keys as styled key representations with appropriate spacing. This constructor allows direct control over which keys are displayed.

Parameters:

  • keys (List
  • spacing (double?, optional): Gap between key displays

Example:

KeyboardDisplay(
  keys: [LogicalKeyboardKey.alt, LogicalKeyboardKey.tab],
  spacing: 6.0,
)

Implementation

const KeyboardDisplay({
  super.key,
  required List<LogicalKeyboardKey> keys,
  this.spacing,
})  : _keys = keys,
      _activator = null;