Table of Contents

Struct KeyboardEventData

Namespace
SharpHook.Native
Assembly
SharpHook.dll

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

ushort
See Also

UndefinedChar

The value of KeyChar in events of type KeyPressed and KeyReleased.

public static readonly char UndefinedChar

Field Value

char
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 KeyboardEventData

The object to compare

Returns

bool

true if the objects are equal. Otherwise, false.

See Also

Equals(object?)

Compares this object to another object for equality.

public override readonly bool Equals(object? obj)

Parameters

obj object

The object to compare

Returns

bool

true if the objects are equal. Otherwise, false.

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 KeyboardEventData

The first object to compare

right KeyboardEventData

The second object to compare

Returns

bool

true if the objects are equal. Otherwise, false.

See Also

operator !=(KeyboardEventData, KeyboardEventData)

Compares two objects for inequality.

public static bool operator !=(KeyboardEventData left, KeyboardEventData right)

Parameters

left KeyboardEventData

The first object to compare

right KeyboardEventData

The second object to compare

Returns

bool

true if the objects are not equal. Otherwise, false.

See Also

See Also