LoomTerminal.Avalonia
0.2.0
dotnet add package LoomTerminal.Avalonia --version 0.2.0
NuGet\Install-Package LoomTerminal.Avalonia -Version 0.2.0
<PackageReference Include="LoomTerminal.Avalonia" Version="0.2.0" />
<PackageVersion Include="LoomTerminal.Avalonia" Version="0.2.0" />
<PackageReference Include="LoomTerminal.Avalonia" />
paket add LoomTerminal.Avalonia --version 0.2.0
#r "nuget: LoomTerminal.Avalonia, 0.2.0"
#:package LoomTerminal.Avalonia@0.2.0
#addin nuget:?package=LoomTerminal.Avalonia&version=0.2.0
#tool nuget:?package=LoomTerminal.Avalonia&version=0.2.0
LoomTerminal.Avalonia
The terminal control for Avalonia (LoomTerminal.Avalonia.Controls.TerminalView), drawn with Skia, on Windows
(ConPTY), Linux and macOS (Unix pty). The WinUI control (LoomTerminal.WinUI) is its specification. Targets plain net11.0, references
LoomTerminal.Presentation only, and is Native AOT compatible (compiled bindings, no XAML loading by reflection).
Install
dotnet add package LoomTerminal.Avalonia
The Unix pty shim comes with LoomTerminal.Pty (runtimes/<rid>/native).
Usage
// xmlns:loom="using:LoomTerminal.Avalonia.Controls" -> <loom:TerminalView x:Name="Terminal" />
Terminal.Session = TerminalSession.Start(
new PtyStartOptions(Shells.Detect()[0].CommandLine), new TerminalSessionOptions { Scrollback = 10_000 });
samples/LoomTerminal.AvaloniaGallery is the full example (tabs, shell menu, settings, demo scripts). See
PublicAPI.Unshipped.txt for the public surface.
Differences from the WinUI control
- The control is named
TerminalView(Avalonia convention). Themeis namedTerminalTheme:StyledElement.Theme(aControlTheme) already exists in Avalonia.TerminalViewderives fromTemplatedControlto getFontFamily,FontSize,FontWeightandPadding; frames are scheduled withTopLevel.RequestAnimationFrame, the blink with aDispatcherTimer.LoomTerminal.Presentationexposes its internals toLoomTerminal.Avalonia(as it does for WinUI): the control readsTerminalSession.CursorBlink,CustomGlyphsandRefreshFrame.- Keyboard: Avalonia
Keyvalues are not virtual keys, soAvaloniaKeyMapholds a full table; AltGr is Ctrl+Alt with the right Alt tracked from key down/up. Text arrives throughTextInput(whole strings, no surrogate buffering). IME goes throughTextInputMethodClienton every platform Avalonia supports (WinUI: Windows 11 only). - Pointer: click count comes from
PointerPressedEventArgs.ClickCount; the cursor is the standard Arrow, Hand over a link with Ctrl down. The scrollbar is aScrollBarin the default template (aFuncControlTemplateset in code, no XAML loading) and uses the user-onlyScrollevent instead of a sync flag.AvaloniaClipboardhops to the UI thread. - Accessibility: Avalonia 12 has no UI Automation text pattern, so
TerminalViewAutomationPeer(aDocument, polite live region) cannot expose the visible lines: screen readers get the name and the announcements of new output only (the announcement is the name of the live region). Avalonia gives no "a client listens" flag: text capture is switched on the first time a platform client asks for the peer. - No
LinkActivatedorKeyPreviewevents yet: a host opens links withTerminalSession.LinkHandlerand claims keys with a tunnellingKeyDownhandler (the Avalonia gallery does both).
Platform notes
- Windows is the reference platform (ConPTY). Linux and macOS use the Unix pty of
LoomTerminal.Pty(libloomterm_pty, ADR 0007): the library must sit next to the application, which a published app or a project reference with the shim built intoartifacts/native/<rid>does. - Default font when the host sets none: Windows
Cascadia Mono, Consolas; macOSMenlo, SF Mono; LinuxDejaVu Sans Mono, Liberation Mono, monospace. - macOS keyboard: Cmd+C copies the selection (with no selection nothing happens: Ctrl+C is the interrupt), Cmd+V
pastes, Cmd+K clears the scrollback. Ctrl+C and Ctrl+V are plain control characters there. Option is not Meta by
default, so Option+letter types accented characters; set
TerminalSessionOptions.MacOptionIsMetato make it Meta. - Linux keyboard: the Windows rules: Ctrl+Shift+C copies (Ctrl+C when text is selected), Ctrl+V and Ctrl+Shift+V paste.
- Linux input methods go through Avalonia's IBus and Fcitx support; they have not been checked by hand yet (see the manual tests).
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net11.0 is compatible. |
-
net11.0
- Avalonia (>= 12.1.4)
- Avalonia.Skia (>= 12.1.4)
- LoomTerminal.Presentation (>= 0.2.0)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 0.2.0 | 1,314 | 11/5/2026 |