AspireTerminalKey
AspireTerminal.SendKeyAsync . namespace Aspire.Hosting.ApplicationModel;
public sealed readonly struct AspireTerminalKey : System.IEquatable<Aspire.Hosting.ApplicationModel.AspireTerminalKey>{ // ...}Remarks
Section titled Remarks Use a named key property and compose Aspire, Aspire, and Aspire to add modifiers. Composition is order-independent, and applying the same modifier repeatedly has no additional effect. A default-initialized value is invalid and cannot be sent or passed to a modifier factory.
Letter keys produce lowercase letters without modifiers and uppercase letters with Aspire. Digit and punctuation keys follow the US keyboard layout. Use Aspire for arbitrary text or Unicode rather than composing keypresses.
These values describe terminal input, not physically held keys. Terminal protocols, platforms, and applications differ in how they interpret key combinations. Legacy terminal encoding cannot distinguish Ctrl+I from Tab, Ctrl+M from Enter, or Ctrl+Shift+letter from Ctrl+letter.
Properties74
Section titled PropertiesMethods9
Section titled MethodsboolboolboolboolExamples
Section titled Examplesawait terminal.SendKeyAsync(AspireTerminalKey.Shift(AspireTerminalKey.E));await terminal.SendKeyAsync(AspireTerminalKey.Ctrl(AspireTerminalKey.Alt(AspireTerminalKey.Delete)));