Watch Aspire live streamsDocsTry Aspire

AspireTerminalKey Methods

StructMethods9 members
Represents one terminal keypress, optionally combined with modifiers, for AspireTerminal.SendKeyAsync.
Adds the Alt modifier to a terminal keypress.
public struct AspireTerminalKey
{
public static AspireTerminalKey Alt(
AspireTerminalKey key)
{
// ...
}
}
keyAspireTerminalKeyThe initialized keypress, including any existing modifiers.
AspireTerminalKeyA keypress with Alt added, preserving its key identity and other modifiers.
ArgumentExceptionkey is default-initialized.
Repeated application has no additional effect, and composition with other modifiers is order-independent.
Adds the Control modifier to a terminal keypress.
public struct AspireTerminalKey
{
public static AspireTerminalKey Ctrl(
AspireTerminalKey key)
{
// ...
}
}
keyAspireTerminalKeyThe initialized keypress, including any existing modifiers.
AspireTerminalKeyA keypress with Control added, preserving its key identity and other modifiers.
ArgumentExceptionkey is default-initialized.
Repeated application has no additional effect, and composition with other modifiers is order-independent.
Equals(AspireTerminalKey)Section titled Equals(AspireTerminalKey)bool
Determines whether another keypress has the same key identity and modifiers.
public struct AspireTerminalKey
{
public bool Equals(
AspireTerminalKey other)
{
// ...
}
}
otherAspireTerminalKeyThe keypress to compare.
booltrue if the key identities and modifiers are equal; otherwise, false.
Equals(object?)Section titled Equals(object?)overridebool
Determines whether an object is a keypress with the same key identity and modifiers.
public struct AspireTerminalKey
{
public override bool Equals(
object? obj)
{
// ...
}
}
objobject?The object to compare, or null.
booltrue if the object is an equal keypress; otherwise, false.
GetHashCodeSection titled GetHashCodeoverrideint
Gets a hash code based on the key identity and modifiers.
public struct AspireTerminalKey
{
public override int GetHashCode()
{
// ...
}
}
intThe hash code for this keypress.
op_Equality(AspireTerminalKey, AspireTerminalKey)Section titled op_Equality(AspireTerminalKey, AspireTerminalKey)staticbool
Determines whether two keypresses have the same key identity and modifiers.
public struct AspireTerminalKey
{
public static bool operator ==(
AspireTerminalKey left,
AspireTerminalKey right)
{
// ...
}
}
leftAspireTerminalKeyThe first keypress.
rightAspireTerminalKeyThe second keypress.
booltrue if the keypresses are equal; otherwise, false.
op_Inequality(AspireTerminalKey, AspireTerminalKey)Section titled op_Inequality(AspireTerminalKey, AspireTerminalKey)staticbool
Determines whether two keypresses differ in key identity or modifiers.
public struct AspireTerminalKey
{
public static bool operator !=(
AspireTerminalKey left,
AspireTerminalKey right)
{
// ...
}
}
leftAspireTerminalKeyThe first keypress.
rightAspireTerminalKeyThe second keypress.
booltrue if the keypresses differ; otherwise, false.
Adds the Shift modifier to a terminal keypress.
public struct AspireTerminalKey
{
public static AspireTerminalKey Shift(
AspireTerminalKey key)
{
// ...
}
}
keyAspireTerminalKeyThe initialized keypress, including any existing modifiers.
AspireTerminalKeyA keypress with Shift added, preserving its key identity and other modifiers.
ArgumentExceptionkey is default-initialized.
Repeated application has no additional effect, and composition with other modifiers is order-independent.
ToStringSection titled ToStringoverridestring
Gets a readable description of this keypress.
public struct AspireTerminalKey
{
public override string ToString()
{
// ...
}
}
string The named key prefixed by any modifiers in Ctrl, Alt, Shift order, separated by +, or Uninitialized for a default-initialized value.