KeyModifiers class

Represents key modifiers (shift, control, alt, etc.).

Note: superKey, hyper, and meta can only be read if KeyboardEnhancementFlags.disambiguateEscapeCodes is enabled

Annotations
  • @immutable

Constructors

KeyModifiers(int mask)
Constructs a new instance of KeyModifiers.
const
KeyModifiers.empty()
Constructs a new instance of KeyModifiers with no modifiers.
factory

Properties

hashCode int
The hash code for this object.
no setterinherited
props List<Object>
The list of properties that will be used to determine whether two instances are equal.
no setter
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
stringify bool?
If set to true, the toString method will be overridden to output this instance's props.
no setterinherited
value int
Returns the value of the modifiers.
no setter

Methods

add(int modifier) KeyModifiers
Add a modifier to the current set of modifiers.
has(int mask) bool
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.

Operators

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

Constants

alt → const int
ctrl → const int
hyper → const int
meta → const int
none → const int
shift → const int
superKey → const int