Struct KeyboardEventData
Represents the data of a keyboard-related event.
Implements
Inherited Members
Namespace: SharpHook.Native
Assembly: SharpHook.dll
Syntax
public struct KeyboardEventData : IEquatable<KeyboardEventData>
Fields
| Improve this Doc View SourceKeyChar
The character of the key.
Declaration
public ushort KeyChar
Field Value
Type | Description |
---|---|
UInt16 | The character of the key. |
Remarks
This field is available only for the KeyTyped event.
This field is of type UInt16 purely for marshalling reasons. It should be used as a Char.
KeyCode
The key code.
Declaration
public KeyCode KeyCode
Field Value
Type | Description |
---|---|
KeyCode | The key code. |
RawCode
The raw key code.
Declaration
public ushort RawCode
Field Value
Type | Description |
---|---|
UInt16 | The raw key code. |
Methods
| Improve this Doc View SourceEquals(KeyboardEventData)
Compares this object to another object for equality.
Declaration
public bool Equals(KeyboardEventData data)
Parameters
Type | Name | Description |
---|---|---|
KeyboardEventData | data | The object to compare |
Returns
Type | Description |
---|---|
Boolean | true if the objects are equal. Otherwise, false. |
Equals(Object)
Compares this object to another object for equality.
Declaration
public override bool Equals(object obj)
Parameters
Type | Name | Description |
---|---|---|
Object | obj | The object to compare |
Returns
Type | Description |
---|---|
Boolean | true if the objects are equal. Otherwise, false. |
Overrides
| Improve this Doc View SourceGetHashCode()
Gets the hash code of this object.
Declaration
public override int GetHashCode()
Returns
Type | Description |
---|---|
Int32 | The hash code of this object. |
Overrides
| Improve this Doc View SourceToString()
Returns the string representation of this object.
Declaration
public override string ToString()
Returns
Type | Description |
---|---|
String | The string representation of this object. |
Overrides
Operators
| Improve this Doc View SourceEquality(KeyboardEventData, KeyboardEventData)
Compares two objects for equality.
Declaration
public static bool operator ==(KeyboardEventData left, KeyboardEventData right)
Parameters
Type | Name | Description |
---|---|---|
KeyboardEventData | left | The first object to compare |
KeyboardEventData | right | The second object to compare |
Returns
Type | Description |
---|---|
Boolean | true if the objects are equal. Otherwise, false. |
Inequality(KeyboardEventData, KeyboardEventData)
Compares two objects for inequality.
Declaration
public static bool operator !=(KeyboardEventData left, KeyboardEventData right)
Parameters
Type | Name | Description |
---|---|---|
KeyboardEventData | left | The first object to compare |
KeyboardEventData | right | The second object to compare |
Returns
Type | Description |
---|---|
Boolean | true if the objects are not equal. Otherwise, false. |