Struct KeyboardEventData
Represents the data of a keyboard-related event.
[ExcludeFromCodeCoverage]
public struct KeyboardEventData : IEquatable<KeyboardEventData>
- Implements
- Inherited Members
Fields
KeyCode
The key code.
public KeyCode KeyCode
Field Value
- KeyCode
The key code.
RawCode
The OS-specific key code.
public ushort RawCode
Field Value
- ushort
The OS-specific key code.
RawKeyChar
The character of the key.
public ushort RawKeyChar
Field Value
- ushort
The character of the key.
Remarks
This field is available only for the KeyTyped event.
In general KeyChar should be used instead of this field. This field is of type ushort purely for marshalling reasons. It should be used as a char.
RawUndefinedChar
The value of RawKeyChar in events of type KeyPressed and KeyReleased.
public static readonly ushort RawUndefinedChar
Field Value
UndefinedChar
The value of KeyChar in events of type KeyPressed and KeyReleased.
public static readonly char UndefinedChar
Field Value
Properties
KeyChar
The character of the key.
public readonly char KeyChar { get; }
Property Value
- char
The character of the key.
Remarks
This property is available only for the KeyTyped event.
Methods
Equals(KeyboardEventData)
Compares this object to another object for equality.
public readonly bool Equals(KeyboardEventData data)
Parameters
dataKeyboardEventDataThe object to compare
Returns
Equals(object?)
Compares this object to another object for equality.
public override readonly bool Equals(object? obj)
Parameters
objobjectThe object to compare
Returns
GetHashCode()
Gets the hash code of this object.
public override readonly int GetHashCode()
Returns
- int
The hash code of this object.
ToString()
Returns the string representation of this object.
public override readonly string ToString()
Returns
- string
The string representation of this object.
Operators
operator ==(KeyboardEventData, KeyboardEventData)
Compares two objects for equality.
public static bool operator ==(KeyboardEventData left, KeyboardEventData right)
Parameters
leftKeyboardEventDataThe first object to compare
rightKeyboardEventDataThe second object to compare
Returns
operator !=(KeyboardEventData, KeyboardEventData)
Compares two objects for inequality.
public static bool operator !=(KeyboardEventData left, KeyboardEventData right)
Parameters
leftKeyboardEventDataThe first object to compare
rightKeyboardEventDataThe second object to compare