Class Input
Input management tools
Inheritance
Namespace: Terminaux.Inputs
Assembly: Terminaux.dll
Syntax
public static class Input
Properties
| Edit this page View SourceDoubleClickTimeout
Specifies the time in milliseconds whether the double click times out
Declaration
public static TimeSpan DoubleClickTimeout { get; set; }
Property Value
Type | Description |
---|---|
TimeSpan |
EnableMouse
Whether to enable mouse support.
Declaration
public static bool EnableMouse { get; set; }
Property Value
Type | Description |
---|---|
bool |
EnableMovementEvents
Checks to see whether the movement events are enabled or not
Declaration
public static bool EnableMovementEvents { get; set; }
Property Value
Type | Description |
---|---|
bool |
InvertScrollYAxis
Whether to invert the Y axis for scrolling or not.
Declaration
public static bool InvertScrollYAxis { get; set; }
Property Value
Type | Description |
---|---|
bool |
Remarks
If this option is enabled, scrolling up emits the scroll down event, and scrolling down emits the scroll up event. Otherwise, scrolling up emits the scroll up event, and scrolling down emits the scroll down event.
PointerActive
Checks to see whether the pointer is active or not
Declaration
public static bool PointerActive { get; }
Property Value
Type | Description |
---|---|
bool |
PointerEncoding
Selects a pointer encoding to use when receiving a raw mouse event
Declaration
public static PointerEncoding PointerEncoding { get; set; }
Property Value
Type | Description |
---|---|
PointerEncoding |
Remarks
While the SGR encoding provides extended position attributes, X10 is more compatible but limited.
SwapLeftRightButtons
Whether to invert the left and the right mouse buttons for left-handed people or not.
Declaration
public static bool SwapLeftRightButtons { get; set; }
Property Value
Type | Description |
---|---|
bool |
Remarks
This is suitable for left-handed people (i.e. you use your mouse in your left hand). If this option is enabled, clicking on the left button of your mouse emits the right click event, and clicking on the right button of your mouse emits the left click event. Otherwise, clicking on the left button of your mouse emits the left click event, and clicking on the right button of your mouse emits the right click event.
Methods
| Edit this page View SourceInvalidateInput()
Invalidates the input
Declaration
public static void InvalidateInput()
ReadKey()
Reads the next key from the console input stream
Declaration
public static ConsoleKeyInfo ReadKey()
Returns
Type | Description |
---|---|
ConsoleKeyInfo |
ReadKeyTimeout(TimeSpan)
Reads the next key from the console input stream with the timeout
Declaration
public static (ConsoleKeyInfo result, bool provided) ReadKeyTimeout(TimeSpan Timeout)
Parameters
Type | Name | Description |
---|---|---|
TimeSpan | Timeout | Timeout |
Returns
Type | Description |
---|---|
(ConsoleKeyInfo result, bool provided) |
ReadPointerOrKey(InputEventType)
Reads either a pointer or a key (blocking)
Declaration
public static InputEventInfo ReadPointerOrKey(InputEventType eventType = InputEventType.Mouse | InputEventType.Keyboard)
Parameters
Type | Name | Description |
---|---|---|
InputEventType | eventType | Event types to wait for (None implies all events) |
Returns
Type | Description |
---|---|
InputEventInfo |
ReadPointerOrKeyNoBlock(InputEventType)
Reads either a pointer or a key (non-blocking)
Declaration
public static InputEventInfo ReadPointerOrKeyNoBlock(InputEventType eventType = InputEventType.Mouse | InputEventType.Keyboard)
Parameters
Type | Name | Description |
---|---|---|
InputEventType | eventType | Event types to wait for (None implies all events) |
Returns
Type | Description |
---|---|
InputEventInfo |