#ConsoleApp

Mouse improvements in Terminaux 8.1

Since Terminaux 4.0, mouse support was added to make C# console applications more interactive. This was done by abstracting the implementations of both the Windows API for detecting mouse clicks in the terminal using the combination of PeekConsoleInput() and MOUSE_INPUT_RECORD, and the Linux method for mouse clicks using the SGR/X10 VT sequences that we have to parse ourselves. The end result is a single function that handles mouse and keyboard input on a ReadPointerOrKey() function, further branched to a non-blocking version.

As a result, we’ve integrated mouse support to all kinds of interactive user interfaces within Terminaux, which resulted in both the library and Nitrocid handling all mouse input, as well as Terminaux programs having mouse support built-in without re-implementing support. However, there was room for improvements when it comes to the selection-based user interfaces.

Terminaux 8.1, which will be released two weeks from now, will feature improvements to mouse support when it comes to the choice selection style TUIs, as well as the interactive selector TUIs. Starting from this version:

  • In the selector TUI, double-clicking on an item in either the first pane or the second pane will trigger the “submit” action, which, by default, is defined to an action bound to the Enter key. For example, in Nitrocid 0.2.0, if you double-click on an SMultivar settings entry in the second pane, the child settings entries underneath this entry will be revealed.
  • In both the selection style and the infobox selection input TUIs, double-clicking on an item in the list of choices will confirm the selection. This allows you to confirm your selection without accidentally selecting a wrong item, since those TUIs always show a list of choices.

This is a behavioral change to the three affected Terminaux input components, which will land to Nitrocid 0.2.0 and 0.1.0 Service Pack 6 next month.

Photo by Rainer Eli on Unsplash

#Net #Net100 #Net80 #C #Console #ConsoleApp #ConsoleApplication #csharp #dotnet #Mouse #MousePointer #news #Pointer #Tech #Technology #terminal #terminaux #Terminaux8 #Terminaux81 #update

Client Info

Server: https://mastodon.social
Version: 2025.07
Repository: https://github.com/cyevgeniy/lmst