RawKeyEventDataMacOs class Null safety

Platform-specific key event data for macOS.

This object contains information about key events obtained from macOS's NSEvent interface.

See also:

  • RawKeyboard, which uses this interface to expose key data.
Inheritance

Constructors

RawKeyEventDataMacOs({String characters = '', String charactersIgnoringModifiers = '', int keyCode = 0, int modifiers = 0, int? specifiedLogicalKey})
Creates a key event data structure specific for macOS.
const

Properties

characters String
The Unicode characters associated with a key-up or key-down event.
final
charactersIgnoringModifiers String
The characters generated by a key event as if no modifier key (except for Shift) applies.
final
hashCode int
The hash code for this object.
read-only, override
isAltPressed bool
Returns true if a ALT modifier key was pressed at the time of this event, regardless of which side of the keyboard it is on.
read-only, inherited
isControlPressed bool
Returns true if a CTRL modifier key was pressed at the time of this event, regardless of which side of the keyboard it is on.
read-only, inherited
isMetaPressed bool
Returns true if a META modifier key was pressed at the time of this event, regardless of which side of the keyboard it is on.
read-only, inherited
isShiftPressed bool
Returns true if a SHIFT modifier key was pressed at the time of this event, regardless of which side of the keyboard it is on.
read-only, inherited
keyCode int
The virtual key code for the keyboard key associated with a key event.
final
keyLabel String
Returns the Unicode string representing the label on this key.
read-only, override
logicalKey LogicalKeyboardKey
Returns an object representing the logical key that was pressed.
read-only, override
modifiers int
A mask of the current modifiers using the values in Modifier Flags.
final
modifiersPressed Map<ModifierKey, KeyboardSide>
Returns a map of modifier keys that were pressed at the time of this event, and the keyboard side or sides that the key was on.
read-only, inherited
physicalKey PhysicalKeyboardKey
Returns an object representing the physical location of this key on a QWERTY keyboard.
read-only, override
runtimeType Type
A representation of the runtime type of the object.
read-only, inherited
specifiedLogicalKey int?
A logical key specified by the embedding that should be used instead of deriving from raw data.
final

Methods

debugFillProperties(DiagnosticPropertiesBuilder properties) → void
Add additional properties associated with the node.
override
getModifierSide(ModifierKey key) KeyboardSide?
Returns a KeyboardSide enum value that describes which side or sides of the given keyboard modifier key were pressed at the time of this event.
override
isModifierPressed(ModifierKey key, {KeyboardSide side = KeyboardSide.any}) bool
Returns true if the given ModifierKey was pressed at the time of this event.
override
noSuchMethod(Invocation invocation) → dynamic
Invoked when a non-existent method or property is accessed.
inherited
shouldDispatchEvent() bool
Whether a key down event, and likewise its accompanying key up event, should be dispatched.
override
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.
override

Constants

deviceIndependentMask → const int
Used to retrieve only the device-independent modifier flags, allowing applications to mask off the device-dependent modifier flags, including event coalescing information.
0xffff0000
modifierCapsLock → const int
This mask is used to check the modifiers field to test whether the CAPS LOCK modifier key is on.
0x10000
modifierCommand → const int
This mask is used to check the modifiers field to test whether one of the CMD modifier keys is pressed.
0x100000
modifierControl → const int
This mask is used to check the modifiers field to test whether one of the CTRL modifier keys is pressed.
0x40000
modifierFunction → const int
This mask is used to check the modifiers field to test whether one of the FUNCTION modifier keys is pressed.
0x800000
modifierHelp → const int
This mask is used to check the modifiers field to test whether the HELP modifier key is pressed.
0x400000
modifierLeftCommand → const int
This mask is used to check the modifiers field to test whether the left CMD modifier keys is pressed.
0x08
modifierLeftControl → const int
This mask is used to check the modifiers field to test whether the left CTRL modifier key is pressed.
0x01
modifierLeftOption → const int
This mask is used to check the modifiers field to test whether the left ALT modifier key is pressed.
0x20
modifierLeftShift → const int
This mask is used to check the modifiers field to test whether the left SHIFT modifier key is pressed.
0x02
modifierNumericPad → const int
This mask is used to check the modifiers field to test whether any key in the numeric keypad is pressed.
0x200000
modifierOption → const int
This mask is used to check the modifiers field to test whether one of the ALT modifier keys is pressed.
0x80000
modifierRightCommand → const int
This mask is used to check the modifiers field to test whether the right CMD modifier keys is pressed.
0x10
modifierRightControl → const int
This mask is used to check the modifiers field to test whether the right CTRL modifier key is pressed.
0x2000
modifierRightOption → const int
This mask is used to check the modifiers field to test whether the right ALT modifier key is pressed.
0x40
modifierRightShift → const int
This mask is used to check the modifiers field to test whether the right SHIFT modifier key is pressed.
0x04
modifierShift → const int
This mask is used to check the modifiers field to test whether one of the SHIFT modifier keys is pressed.
0x20000