ShortcutActivator class

Represents a keyboard shortcut (key + optional modifiers).

Use with Shortcuts widget to bind actions to key combinations. Example: ShortcutActivator(key: KeyCode.s, ctrl: true) for Ctrl+S.

Constructors

ShortcutActivator({required KeyCode key, bool? ctrl, bool? alt, bool? shift})
Creates a ShortcutActivator for the given key with optional modifiers.
const

Properties

alt bool?
Whether the Alt modifier must be held.
final
ctrl bool?
Whether the Ctrl modifier must be held.
final
hashCode int
The hash code for this object.
no setteroverride
key KeyCode
The key code that triggers this shortcut.
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
shift bool?
Whether the Shift modifier must be held.
final

Methods

accepts(KeyEvent event) bool
Returns true if event matches this activator's key and modifiers.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
override

Operators

operator ==(Object other) bool
The equality operator.
override