Struct KeyboardEventData
Represents the data of a keyboard-related event.
public struct KeyboardEventData : IEquatable<KeyboardEventData>
- Implements
- Inherited Members
Fields
KeyCode
The key code.
public KeyCode KeyCode
Field Value
- KeyCode
The key code.
- See Also
RawCode
The OS-specific key code.
public ushort RawCode
Field Value
- ushort
The OS-specific key code.
- See Also
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.
- See Also
RawUndefinedChar
The value of RawKeyChar in events of type KeyPressed and KeyReleased.
public static readonly ushort RawUndefinedChar
Field Value
- See Also
UndefinedChar
The value of KeyChar in events of type KeyPressed and KeyReleased.
public static readonly char UndefinedChar
Field Value
- See Also
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.
- See Also
Methods
Equals(KeyboardEventData)
Compares this object to another object for equality.
public readonly bool Equals(KeyboardEventData data)
Parameters
data
KeyboardEventDataThe object to compare
Returns
- See Also
Equals(object?)
Compares this object to another object for equality.
public override readonly bool Equals(object? obj)
Parameters
obj
objectThe object to compare
Returns
- See Also
GetHashCode()
Gets the hash code of this object.
public override readonly int GetHashCode()
Returns
- int
The hash code of this object.
- See Also
ToString()
Returns the string representation of this object.
public override readonly string ToString()
Returns
- string
The string representation of this object.
- See Also
Operators
operator ==(KeyboardEventData, KeyboardEventData)
Compares two objects for equality.
public static bool operator ==(KeyboardEventData left, KeyboardEventData right)
Parameters
left
KeyboardEventDataThe first object to compare
right
KeyboardEventDataThe second object to compare
Returns
- See Also
operator !=(KeyboardEventData, KeyboardEventData)
Compares two objects for inequality.
public static bool operator !=(KeyboardEventData left, KeyboardEventData right)
Parameters
left
KeyboardEventDataThe first object to compare
right
KeyboardEventDataThe second object to compare
Returns
- See Also