Treehopper C# API
KeyboardInputState Struct Reference

Public Member Functions

 KeyboardInputState (uint value)
 

Public Attributes

uint Value
 
uint RepeatCount => this.Value & 0x0000ffff
 The repeat count for the current message. More...
 
uint ScanCode => (this.Value >> 16) & 0x000000ff
 
bool IsExtendedKey => unchecked(((int) this.Value >> 24) & 0x1) == 1
 Indicates whether the key is an extended key, such as the right-hand ALT and CTRL keys that appear on an enhanced 101- or 102-key keyboard. More...
 
bool IsContextual => unchecked(((int) this.Value >> 29) & 0x1) == 1
 The value is 1 if the ALT key is down while the key is pressed; it is 0 if the WM_SYSKEYDOWN message is posted to the active window because no window has the keyboard focus. More...
 
bool IsPreviousKeyStatePressed => unchecked(((int) this.Value >> 30) & 0x1) == 1
 The value is 1 if the key is down before the message is sent, or it is 0 if the key is up. More...
 
bool IsKeyUpTransition => unchecked(((int) this.Value >> 31) & 0x1) == 1
 The value is 1 if the key is being released, or it is 0 if the key is being pressed. More...
 

Constructor & Destructor Documentation

◆ KeyboardInputState()

KeyboardInputState ( uint  value)
inline

Member Data Documentation

◆ IsContextual

bool IsContextual => unchecked(((int) this.Value >> 29) & 0x1) == 1

The value is 1 if the ALT key is down while the key is pressed; it is 0 if the WM_SYSKEYDOWN message is posted to the active window because no window has the keyboard focus.

◆ IsExtendedKey

bool IsExtendedKey => unchecked(((int) this.Value >> 24) & 0x1) == 1

Indicates whether the key is an extended key, such as the right-hand ALT and CTRL keys that appear on an enhanced 101- or 102-key keyboard.

The value is 1 if it is an extended key; otherwise, it is 0.

◆ IsKeyUpTransition

bool IsKeyUpTransition => unchecked(((int) this.Value >> 31) & 0x1) == 1

The value is 1 if the key is being released, or it is 0 if the key is being pressed.

◆ IsPreviousKeyStatePressed

bool IsPreviousKeyStatePressed => unchecked(((int) this.Value >> 30) & 0x1) == 1

The value is 1 if the key is down before the message is sent, or it is 0 if the key is up.

◆ RepeatCount

uint RepeatCount => this.Value & 0x0000ffff

The repeat count for the current message.

The value is the number of times the keystroke is autorepeated as a result of the user holding down the key. If the keystroke is held long enough, multiple messages are sent. However, the repeat count is not cumulative.

◆ ScanCode

uint ScanCode => (this.Value >> 16) & 0x000000ff

◆ Value

uint Value

The documentation for this struct was generated from the following file: