CrossPlatformSingleActivator class
A cross-platform SingleActivator.
You only need to use this class if you want a shortcut which uses the control key on Windows, or the command key on Mac OS.
For example: CTRL/CMD+O for open, CTRL/CMD+S for save.
- Inheritance
-
- Object
- SingleActivator
- CrossPlatformSingleActivator
Constructors
- CrossPlatformSingleActivator(LogicalKeyboardKey trigger, {bool shift = false, bool alt = false, LockState numLock = LockState.ignored, bool includeRepeats = true})
- Create an instance.
Properties
- alt → bool
-
Whether either (or both) alt keys should be held for trigger to
activate the shortcut.
finalinherited
- control → bool
-
Whether either (or both) control keys should be held for trigger to
activate the shortcut.
finalinherited
- hashCode → int
-
The hash code for this object.
no setterinherited
- includeRepeats → bool
-
Whether this activator accepts repeat events of the trigger key.
finalinherited
- meta → bool
-
Whether either (or both) meta keys should be held for trigger to
activate the shortcut.
finalinherited
- numLock → LockState
-
Whether the NumLock key state should be checked for trigger to activate
the shortcut.
finalinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- shift → bool
-
Whether either (or both) shift keys should be held for trigger to
activate the shortcut.
finalinherited
- trigger → LogicalKeyboardKey
-
The non-modifier key of the shortcut that is pressed after all modifiers
to activate the shortcut.
finalinherited
-
triggers
→ Iterable<
LogicalKeyboardKey> -
An optional property to provide all the keys that might be the final event
to trigger this shortcut.
no setterinherited
Methods
-
accepts(
KeyEvent event, HardwareKeyboard state) → bool -
Whether the triggering
event
and the keyboardstate
at the time of the event meet required conditions, providing that the event is a triggering event.inherited -
debugDescribeKeys(
) → String -
Returns a short and readable description of the key combination.
inherited
-
debugFillProperties(
DiagnosticPropertiesBuilder properties) → void -
Add additional properties associated with the node.
inherited
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
serializeForMenu(
) → ShortcutSerialization -
Implement this in a ShortcutActivator subclass to allow it to be
serialized for use in a PlatformMenuBar.
inherited
-
toDiagnosticsNode(
{String? name, DiagnosticsTreeStyle? style}) → DiagnosticsNode -
Returns a debug representation of the object that is used by debugging
tools and by DiagnosticsNode.toStringDeep.
inherited
-
toString(
{DiagnosticLevel minLevel = DiagnosticLevel.info}) → String -
A string representation of this object.
inherited
-
toStringShort(
) → String -
A brief description of this object, usually just the runtimeType and the
hashCode.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited