Home » Developing U++ » UppHub » A terminal emulator widget for U++
|
|
| Re: A terminal emulator widget for U++ [message #58442 is a reply to message #58441] |
Sat, 21 May 2022 00:00   |
Oblivion
Messages: 1267 Registered: August 2007
|
Senior Contributor |
|
|
Hello jacksonRIAB,
Just to give you some idea as to where TerminalCtrl stands:
This is somewhat old, but results (ratio) still hold and --in fact lot better--(I will update the results ASAP, after I merge the new optimizations...)
CPU: AMD FX 6100 - Black Edition (Six-core processor)
Memory: 8 GiB, DDR-3 1800 Mhz
Storage: 128 Gib SSD, 1Tib HDD
Graphics: AMD Radeon R7 240, 2GiB
Monitor: LCD, HD (1080p)
OS/Kernel: Arch/Linux 5.9 (x86_64)
Desktop: GNOME 3.36 (X11)
Framework: Ultimate++ 2020.1 (alpha)
Flags: GUI
Compilers: GCC 10.0.1 CLANG 10.0.0
Application: TerminalExample (with a high througput loop).
Disclaimer: The benchmarks below do not represent any competition.
they don't represent any weak spots of the used terminals.
The sole purpose of these benchmarks is to give an idea as to where
the Terminal ctrl's "engine" performance stands ATM.
Note: All benchmarks are repeated 50 times, automatically.
The performance difference between GCC/CLANG builds is negligeable.
The latest stable versions of these terminals are used (as of May-June 2020).
Results of command: "time find /usr", Total files: 415897, page size: 237 x 55, Monospace Font)
Terminal Emulator real user sys Notes
----------------- ---------- ---------- ---------- ----------
Alacritty 0m3,776s 0m1,134s 0m2,637s Scrollback buffer size: 64k
Terminal ctrl 0m4,126s 0m1,202s 0m2,466s Scrollback buffer size: 64k
Kitty 0m5,608s 0m1,224s 0m2,763s Scrollback buffer size: 64k
Gnome Terminal 0m6,785s 0m1,243s 0m3,015s Scrollback buffer size: 64k
xterm 0m24,368s 0m1,661s 0m3,766s Scrollback buffer size: 64k
Terminal Emulator real user sys Notes
----------------- ---------- ---------- ---------- ----------
Simple terminal (0.8) 0m3,791s 0m1,162s 0m2,533s Has no scrollback buffer.
Terminal ctrl (0.3) 0m3,971s 0m1,120s 0m2,472s Scrollback disabled.
Terminal Emulator real user sys Notes
----------------- ---------- ---------- ---------- ----------
Terminal ctrl (0.3) 0m4,380s 0m1,479s 0m2,536s localhost, Scrollback buffer size: 2000 lines, no compression, (SshTerminalExample is used)
PuTTY (0.73) 0m40,828s 0m1,354s 0m3,071s localhost, Scrollback buffer size: 2000 lines, no compression
// Vte-bench, benchmark 1: scrolling. page size: 237 x 55, Monospace Font.
Terminal Emulator real user sys Notes
----------------- ---------- ---------- ---------- ----------
Alacritty 0m1,936s 0m0,001s 0m0,946s
Kitty 0m2,985s 0m0,000s 0m0,567s
Gnome Terminal 0m3,758s 0m0,001s 0m0,940s
Terminal ctrl 0m4,064s 0m0,000s 0m0,859s
Simple terminal (0.8) 0m4,623s 0m0,000s 0m1,105s
xterm 0m47,249s 0m0,000s 0m0,567s
// Vte-bench, benchmark 2: alt-screen-random-write, page size: 237 x 55, Monospace Font.
Terminal Emulator real user sys Notes
----------------- ---------- ---------- ---------- ----------
Alacritty 0m1,520s 0m0,000s 0m0,554snear-real-life,
Kitty 0m2,750s 0m0,000s 0m0,408s
Gnome Terminal 0m3,153s 0m0,004s 0m0,726s
Terminal ctrl 0m3,790s 0m0,000s 0m0,474s
Simple terminal (0.8) 0m7,097s 0m0,001s 0m0,825s
xterm 0m19,797s 0m0,001s 0m0,993s
// Vte-bench, benchmark 3: scrolling-in-region, page size: 237 x 55, Monospace Font.
Terminal Emulator real user sys Notes
----------------- ---------- ---------- ---------- ----------
Alacritty 0m3,337s 0m0,001s 0m3,297s
Gnome Terminal 0m5,280s 0m0,001s 0m3,254s
Kitty 0m6,326s 0m0,001s 0m6,034s
Terminal ctrl 0m6,739s 0m0,001s 0m4,033s
Simple terminal (0.8) 0m7,844s 0m0,001s 0m7,348s
xterm 3m36,599s 0m0,001s 0m11,011s
If you need help with TerminalCtrl, or have any questions, please let me know.
Best regards,
Oblivion
Github page: https://github.com/ismail-yilmaz
Bobcat the terminal emulator: https://github.com/ismail-yilmaz/Bobcat
[Updated on: Sat, 21 May 2022 00:15] Report message to a moderator
|
|
|
|
|
|
| Compile problem on WIN10 [message #58812 is a reply to message #51415] |
Tue, 13 September 2022 15:15   |
 |
peterh
Messages: 108 Registered: November 2018 Location: Germany
|
Experienced Member |
|
|
Hi, I tried TerminalLayoutExample and some other Examples.
These show a compilation error on WIN 10. It doesnt matter if I use CLang or MSVC.
HANDLE WinPtyCreateProcess(const char *cmdptr, const char *envptr, const char *cd, winpty_t* hConsole)
{
Buffer<wchar> cmd, env;
sCmdToUnicode(cmd, cmdptr);
sEnvToUnicode(env, envptr);
auto hSpawnConfig = winpty_spawn_config_new(
WINPTY_SPAWN_FLAG_AUTO_SHUTDOWN,
cmd, //error here
nullptr,
cd ? ~WString(cd) : nullptr, //error here
env, //error here
nullptr);
C:\upp\UppHub\TerminalCtrl\PtyProcess\Win32Pty.cpp (104): error: no matching function for call to 'winpty_spawn_config_new'
(): auto hSpawnConfig = winpty_spawn_config_new(
C:\upp\UppHub\TerminalCtrl\PtyProcess/lib/include/winpty.h (170): note: candidate function not viable: no known conversion from 'Buffer<Upp::wchar>' (aka 'Buffer<unsigned long>') to 'LPCWSTR' (aka 'const wchar_t *') for 2nd argument
(): winpty_spawn_config_new(UINT64 spawnFlags,
(): 1 error generated.
It cannot convert from Buffer<wchar> to LPCWSTR.
I tried to fix it, but no sucess.
My C++ and Upp knowledge is very limited, C knowledge is pretty good.
It happens with Build 16324 and with the stable Build.
Edit:
I can compile it by this modification:
auto hSpawnConfig = winpty_spawn_config_new(
WINPTY_SPAWN_FLAG_AUTO_SHUTDOWN,
(wchar_t *) ~cmd,
nullptr,
(wchar_t *) (cd ? ~WString(cd) : nullptr),
(wchar_t *) ~env,
nullptr);
Then it compiles and runs, it opens a window, and closes it immediately without any error message.
I dont think this is the intended behaviour.
[Updated on: Tue, 13 September 2022 18:39] Report message to a moderator
|
|
|
|
|
|
| Re: Compile problem on WIN10 [message #58816 is a reply to message #58814] |
Wed, 14 September 2022 03:48   |
 |
peterh
Messages: 108 Registered: November 2018 Location: Germany
|
Experienced Member |
|
|
Thank you.
My typecasting was a quickn dirty attempt and only for experimentation to get something running in the debugger for further investigation.
I cant fix it myself, that is clear now.
Thanks for your work!
[Updated on: Wed, 14 September 2022 03:57] Report message to a moderator
|
|
|
|
|
|
| Re: Compile problem on WIN10 [message #58820 is a reply to message #58819] |
Thu, 15 September 2022 06:54   |
 |
peterh
Messages: 108 Registered: November 2018 Location: Germany
|
Experienced Member |
|
|
Thank you.
I tried two examples: TabbedTerminalExample and TerminalLayoutExample.
Both show similar behavior:
With "GUI" they compile without warnings. When started, they open a window and immediately close it and terminate without error.
With "GUI WIN10" there is the same compilation error in both:
C:/upp/out/UppHub/PtyProcess/CLANGx64.Debug.Debug_Full.Gui.Win10\PtyProcess$blitz.cpp (13): In file included from C:/upp/out/UppHub/PtyProcess/CLANGx64.Debug.Debug_Full.Gui.Win10\PtyProcess$blitz.cpp:13:
C:\upp\UppHub\TerminalCtrl\PtyProcess\Win32Pty.cpp (80): error: expected ')'
C:\upp\UppHub\TerminalCtrl\PtyProcess\Win32Pty.cpp (88): error: extraneous ')' before ';'
C:\upp\UppHub\TerminalCtrl\PtyProcess\Win32Pty.cpp (81): warning: left operand of comma operator has no effect [-Wunused-value]
C:\upp\UppHub\TerminalCtrl\PtyProcess\Win32Pty.cpp (82): warning: left operand of comma operator has no effect [-Wunused-value]
(): nullptr,
C:\upp\UppHub\TerminalCtrl\PtyProcess\Win32Pty.cpp (84): warning: left operand of comma operator has no effect [-Wunused-value]
C:\upp\UppHub\TerminalCtrl\PtyProcess\Win32Pty.cpp (87): warning: left operand of comma operator has no effect [-Wunused-value]
C:\upp\UppHub\TerminalCtrl\PtyProcess\Win32Pty.cpp (88): warning: expression result unused [-Wunused-value]
On Win10 64 Bit, compiled with Clang 64 bit and MSVC 64 bit.
Upp is version 16324. I tried Stable built of Upp too, this did not solve it.
[Updated on: Thu, 15 September 2022 06:58] Report message to a moderator
|
|
|
|
| Re: Compile problem on WIN10 [message #58821 is a reply to message #58820] |
Thu, 15 September 2022 07:14   |
Oblivion
Messages: 1267 Registered: August 2007
|
Senior Contributor |
|
|
Quote:I tried two examples: TabbedTerminalExample and TerminalLayoutExample.
Both show similar behavior:
With "GUI" they compile without warnings. When started, they open a window and immediately close it and terminate without error.
Hmm..
For winpty backend:
Have you also compiled the PtyAgent package (It is in the UppHub/TerminalCtrl folder)?
You also need to compile the PtyAgent package and move the resulting PtyAgent.exe into the same folder of your main executable. It is an agent (daemon) that winpty backend talks to.
For Win10:
I will look into the problem tonight, and try to fix the issue.
Also, you can enable the Log in the relevant ptyprocess file by uncommenting the LLOG
Thank you for your patience.
Best regards,
Oblivion
Github page: https://github.com/ismail-yilmaz
Bobcat the terminal emulator: https://github.com/ismail-yilmaz/Bobcat
[Updated on: Thu, 15 September 2022 07:18] Report message to a moderator
|
|
|
|
|
|
|
|
| Re: A terminal emulator widget for U++ [message #58825 is a reply to message #58823] |
Thu, 15 September 2022 09:03   |
 |
peterh
Messages: 108 Registered: November 2018 Location: Germany
|
Experienced Member |
|
|
I think I found a problem in TabbedTerminalExample main() Run()
while(IsOpen() && !tabs.IsEmpty()) {
ProcessEvents();
for(int i = 0; i < tabs.GetCount(); i++) {
TerminalTab& tt = tabs[i];
/* Error here? --->*/ if(!tt.Do()) {
tabbar.RemoveCtrl(tt);
tabs.Remove(i);
i--;
}
}
Sleep(10);
}
If I replace the marked line by
Then it opens a tabbed window.
I dont fully understand the code and why the loop counter is decremented inside the loop, however this seems to be a problem, because "i" becomes negative, when it was zero before.
Edit: I do now think after some research, the program is ok, and I simply dont have the interface required.
I know terminals and emulators from my job (I am retired now), these start up, then you can select the interface, but this program apparently has no selection and I do not know which interface or port it needs.
[Updated on: Thu, 15 September 2022 12:15] Report message to a moderator
|
|
|
|
| Re: A terminal emulator widget for U++ [message #58830 is a reply to message #58823] |
Thu, 15 September 2022 19:09   |
Oblivion
Messages: 1267 Registered: August 2007
|
Senior Contributor |
|
|
Hello peterh,
peterh wrote on Thu, 15 September 2022 08:58Yes, now both compile without warnings, both with "GUI" and "GUI WIN10".
To achieve this, it was not enough to reinstall, I deleted the "TerminalCtrl" directory and installed fresh.
Both now open a window and close it immediately.
I am not in a hurry; I am just trying this stuff and do not know how this will work, I am just trying.
I am not sure if I am doing something wrong or if I need something additional.
I had the idea to embed a terminal control into my own app, but as said, I am not in a hurry and if I can help or test something I am happy to do so.
Thank you for your reports and patience.
For winpty backend:
I assume that you've moved the PtyAgent.exe into the same directory as TerminalLayoutExample.exe,
Then "normally" there are only a few things that can cause the terminal window to open and close immediately (pty failure):
1) The variables passed to PtyProcess (env, cd, cmd) have some error. E.g., the examples use "ComSpec" env variable to locate the command line interface executable (cmd.exe or powershell.exe, etc.) This can be checked by manually providing the full path of cmd.exe or powershell.exe to the PtyProcess.
2) Execution of or access to PtyAgent executable is blocked by Windows. (insufficient permissions)
Either case, I'd be grateful if you could post the log file (uncommenting the LLOG() macro in Win32Pty.cpp before running the example)
Still, I am going to improve the error handling/diagnostics in PtyProcess this weekend.
Best regards,
Oblivion
Github page: https://github.com/ismail-yilmaz
Bobcat the terminal emulator: https://github.com/ismail-yilmaz/Bobcat
[Updated on: Thu, 15 September 2022 19:55] Report message to a moderator
|
|
|
|
|
|
|
|
| Re: A terminal emulator widget for U++ [message #58852 is a reply to message #58834] |
Sat, 17 September 2022 18:40   |
Oblivion
Messages: 1267 Registered: August 2007
|
Senior Contributor |
|
|
Hello peterh,
I've tried to fix WIN10 issue. Please check.
The lack of documentation is my fault (laziness/). I will add some doc to clarify the usage and setup of PtyProcess.
In the meantime, here's a short summary that can make basic things clear.
1) PtyProcess can use two backends on Windows (for console process):
a) winpty: This backend can be compiled and run on Win >= Vista.
Requires the PtyAgent.exe to be present. This agent is a daemon that handles the win32 console stuff.
The PtyAgent executable must be put into the same directory as the application using the PtyProces.
PtyAgent can be found in TerminalCtrl/PtyAgent folder. It has to be separately compiled.
This backend does not require U++ to be compiled with WIN10 flag.
b) win10: This backend uses the window 10 native pseudoconsole api. This api and relevant subsystem is added to
windows with the later revisions of windows 10. Does not use or require winpty or Ptyagent.exe
This backend requires U++ to be compiled with WIN10 flag.
2) Either of these backends can be used on windows version >= 10. Only winpty can be used on Windows version < 10
3) TerminalCtrl does not require PtyProcess. You can write your own. TerminalCtrl only expects data input.
The source of the input is up to the user/developer. PtyPRocess is only a reference implementation,
and provided with the Terminal packages as a default option.
4) To better test TerminalCtrl and PtyProcess in Windows, recommended demo case would be to install
the good old Far Manager (a text mode file manager you can find on the net).
If you have more questions or need any help embedding TerminalCtrl/PtyProcess into your app, let me know.
Best regards,
Oblivion
Github page: https://github.com/ismail-yilmaz
Bobcat the terminal emulator: https://github.com/ismail-yilmaz/Bobcat
[Updated on: Sat, 17 September 2022 18:44] Report message to a moderator
|
|
|
|
|
|
| Re: A terminal emulator widget for U++ [message #59193 is a reply to message #51415] |
Sun, 20 November 2022 21:11   |
Oblivion
Messages: 1267 Registered: August 2007
|
Senior Contributor |
|
|
Hi,
Next week I will push the latest changes to Terminal package.
On of the major highlights of this version will be the performance optimizations.
I have heavily refactored the sequence parser and have been testing the hell out of it for around 6 months.
The results are: 3-5 times higher throughput.(In certain demanding scenarios the jump is from 120 MB/secs, to 600 MB secs, which is almost the limits of the testing machine (specs will be available with the update too)
But for now I have used the very demanding notcurses demos to whet your appetite (A video):

Notice that, the application (notcurses demo) in not simply bombarding the terminal display with a bunch of unicode characters to sample a video. As you can see on the top-right corner, there is actually a sixel "camera" view of the same lift-off video, in sync. The raw "horse-power" of the optimized parser and sixel renderer is enough for us to both write unicode (notascci) art image and and direct pixels on the terminal display at the same time. And this happends synchronously, no MT is used.
Link to the full video (taken on TerminalLayoutExample): https://vimeo.com/773086733
Best regards,
Oblviion
Github page: https://github.com/ismail-yilmaz
Bobcat the terminal emulator: https://github.com/ismail-yilmaz/Bobcat
[Updated on: Sun, 20 November 2022 21:55] Report message to a moderator
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| Re: A terminal emulator widget for U++ [message #60541 is a reply to message #51415] |
Sat, 13 April 2024 10:42   |
Oblivion
Messages: 1267 Registered: August 2007
|
Senior Contributor |
|
|
Hi,
After a long, silent period, we're back here again.
There has been much work going into TerminalCtrl nowadays, mostly bug fixes, optimizatios and internal maintenance but also some cool new features are here too. Since the next "release" (milestone) will be 2024.1 (v0.9), I'd like to give an update on its status.
Bug fixes aside, there are now six important features, already fully or partially implemented:
1) Selector Mode: TerminalCtrl now allows full keyboard navigation for selecting text in a special mode called "Selector Mode".
At the moment, three types of selection are possible in this mode: text, rectangle, word.
2) Annotations: This is a cool new feature. User or the hosted app can now add annotations to terminal texts (in both plain text and rich text (qtf) format).
This can be done via user input (mouse, or keyboard in selector mode) or programatically (using a simple, proprietary protocol). AFAIK, this has been one of the most favored iterm2 features.
3) Word Selection filters: Word selection filter can now be set by the client code. It allows cell-level inspection, so it is even possible to select blocks of text ("words") according to their SGR attributes, associated data type, or colors.
4) Highlighting: TerminalCtrl allows full cell-level highlighting.
5) Shell integration: TerminalCtrl now allows hosted apps or shells to notify the terminal of the working directory, so the terminal can be aware of its environment (and act accordingly).
6) Configurable Keyboard shortcuts: Keyboard shortcuts are now configurable and can be redefined in client code.
All of these features are already utilized in Bobcat, cross-platform terminal emulator.
Best regards,
Oblivion
Github page: https://github.com/ismail-yilmaz
Bobcat the terminal emulator: https://github.com/ismail-yilmaz/Bobcat
[Updated on: Sat, 13 April 2024 10:52] Report message to a moderator
|
|
|
|
|
|
|
|
|
|
|
|
| Re: A terminal emulator widget for U++ [message #60941 is a reply to message #51415] |
Sun, 13 October 2024 00:18   |
Oblivion
Messages: 1267 Registered: August 2007
|
Senior Contributor |
|
|
Hi,
There is another significant improvement in TerminalCtrl package, specifially in PtyProcesss package: PtyProcess package refactored, and process types are split into their respective classes.
- All PtyProcess classes are now derived from APtyProcess base class.
- On Windows, it is now possible to use both WinPty (as WinPtyProcess) and Windows console api (ConPtyProcess) at the same time
- On Linux the actual class is named as PosixPtyProcess.
- Existing code will work, since the PtyProcess is now an alias which designates PosixPtyProcess on *NIX systems, and depending on the WIN10 flag it designates either ConPty or WinPty. (Old behavior is kept.)
- Since they are all derived from the APtyProcess class, it is now possible to dynamically create and store them in the same container.
Best regards,
Oblivion
Github page: https://github.com/ismail-yilmaz
Bobcat the terminal emulator: https://github.com/ismail-yilmaz/Bobcat
|
|
|
|
| Re: A terminal emulator widget for U++ [message #61213 is a reply to message #51415] |
Sun, 08 December 2024 10:23   |
Oblivion
Messages: 1267 Registered: August 2007
|
Senior Contributor |
|
|
[code]
Hi,
The day has arrived, and TerminalCtrl 2025.1 is released. 
Release Notes:
---
Requirements
- U++ >= 2024.1
- C++17
Customizability
- Custom Word/Cell Selection: Supports client-defined word selection via a filter. Selections can be based on text, SGR attributes, data types, or colors.
- Selector Mode: Introduced "Selector Mode" for keyboard navigation and text selection, supporting text, rectangle, line, and word selections.
- Configurable keyboard Shortcuts: All shortcuts are made configurable and can be redefined in client code.
- Text Search: TerminalCtrl now have support for text search, including range-based and parallel (`CoFind`) search
- Annotations: Users and hosted apps can now add annotations to terminal text (plain text or rich text via a simple protocol or menu).
- Custom Highlighting: Custom *cell-level* highlighting support.
- Application Mouse Tracking Override: Added the ability to override application mouse tracking with customizable modifier keys (Ctrl, Shift, Alt, and their combinations).
---
Protocols
- Directory Change Protocol: Implements the `OSC 7` and `OSC 9 ; 9`protocols to notify the terminal of the shell's working directory.
- Message Notification Protocol: Implements the `OSC 9 ; 2` message notification support.
- Progress Notification Protocol: Implements the `OSC 9 ; 4` protocol, used by modern terminal emulators, this protocol allows tracking of progress from hosted applications.
- iTerm2 Background Image Protocol: Implements iTerm2's background image change protocol.
---
Appearance
- Hyperlink Underline: Hyperlinks now switch to an under-dot pattern when using the underline attribute.
- Size Hint: The size hint now has rounded edges for better aesthetics.
---
Bug Fixes
- Mouse Reporting: Fixed mouse reporting bug.
- PC-Style Keys: Fixed the handling of HOME/END keys in PC-style mode.
- Stray Unicode Character: Fixed the Alt+Win key combination issue that produced stray Unicode characters.
- Background Transparency: Addressed transparency and background rendering issues.
- Selection on Resize: Selections are now cleared properly when resizing the terminal.
---
Performance Improvements
- Renderer Optimization: Refactored the renderer to combine non-contiguous characters, resulting in better performance
---
Behavior Changes
- Modifier Keys: `AltGr` and `Super` modifier keys no longer scroll the page.
- Page Scroll on Paste: The page now automatically scrolls to the bottom when pasting.
- Terminal Resize Behavior: Terminal lines are no longer truncated when resizing to a smaller window.
Code Maintenance
- Code Cleanup: Removed unused variables, redundant code.
- APtyProcess Base Class:
- All PtyProcess classes are now derived from APtyProcess.
- On Linux, the active class is `PosixPtyProcess`.
- On Windows, it can use either `WinPtyProcess` or `ConPtyProcess` based on system configuration.
- This makes it possible to dynamically manage different PtyProcess types in a single container.
If you wonder what can be achieved with TerminalCtrl, just check Bobcat (which is to be released officially before the end of the year.).
Best regards,
Oblivion
Github page: https://github.com/ismail-yilmaz
Bobcat the terminal emulator: https://github.com/ismail-yilmaz/Bobcat
[Updated on: Sun, 08 December 2024 10:24] Report message to a moderator
|
|
|
|
|
|
|
|
| Re: A terminal emulator widget for U++ [message #61627 is a reply to message #51415] |
Tue, 01 April 2025 09:29   |
Oblivion
Messages: 1267 Registered: August 2007
|
Senior Contributor |
|
|
Hi,
New feature is added to Terminal/Ptyprocess:
PtyWaitEvent class
- Its API is virtually identical to SocketWaitEvent but for Pty processes.
- Provides a mechanism for waiting on multiple pseudoterminal (pty) processes to become ready for I/O operations.
- On windows it uses I/O Completion Ports (IOCP) to wait for events on process and pipe handles.
- On POSIX-compliant operating systems it uses the poll() system call to wait for events on pty/file descriptors
- On all platform this class effectively removes the limitation of max 64 wait objects.
Best regards,
Oblivion
Github page: https://github.com/ismail-yilmaz
Bobcat the terminal emulator: https://github.com/ismail-yilmaz/Bobcat
[Updated on: Tue, 01 April 2025 09:30] Report message to a moderator
|
|
|
|
| Re: A terminal emulator widget for U++ [message #61644 is a reply to message #51415] |
Sun, 13 April 2025 14:08   |
Oblivion
Messages: 1267 Registered: August 2007
|
Senior Contributor |
|
|
Hi,
TerminalCtrl has gained another capability, another feature: Semantic Information Protocol, or OSC 133
| Sequence | Description | Device Level |
| --- | --- | --- |
|`OSC 133 ; [command] ST` | Sets the semantic information, starting from the cursor position. | Level 1 |
#### Notes
- `command` can be one of the following four values (case sensitive):
- `A`: Marks the starting point of the shell prompt.
- `B`: Marks the end of the shell prompt and the start of the user input.
- `C`: Marks the end of the user input and the start of the command output.
- `D`: Marks the end of the command output.
- TerminalCtrl currently supports only a minimal--but reasonable--subset of this protocol. This may change in the future.
- TerminalCtrl does not process or display semantic information by itself. Instead, it is up to the client code to make use of the protocol, typically in combination with features like cell highlighting or search functionality.
Well, what is it good for, you might ask.
It allows clear separation between three semantically different sections of terminal output, usually on shells: prompt, user input and command output.
By this separation, it becomes possible to treat three different section of terminal output separately. For example, a search function can search exclusively for command outputs, user inputs or prompts.
Or extracting and highlighting only a specific type of data (e.g. command outputs) become possible.
Of course, Bobcat will utilize this protocol ASAP.
Best regards,
Oblivion
Github page: https://github.com/ismail-yilmaz
Bobcat the terminal emulator: https://github.com/ismail-yilmaz/Bobcat
|
|
|
|
| Re: A terminal emulator widget for U++ [message #61778 is a reply to message #51415] |
Sun, 17 August 2025 15:48   |
Oblivion
Messages: 1267 Registered: August 2007
|
Senior Contributor |
|
|
Hi,
Happy to announce that TerminalCtrl 2025.2 (v1.0) is released.
# What's Changed
## Requirements
- U++ 2025.1
- C++17
## Highlights
- `PtyWaitEvent` class added for proper event waiting across the supported platforms.
- `PtyProcess` class now check for the dll version of ConPty first, to take advantage of the newest features and improvements.
- A subset of semantic information protocol (`OSC 133`) is implemented.
- Option to treat ambiguous width characters as wide characters.
## Changes and Fixes
TerminalCtrl: Semantic information protocol (OSC 133) (59c332c)
TerminalCtrl: Synchronized output feature detection. (7013fa8)
TerminalCtrl: VT mouse events are now ignored if the terminal is in read-only mode. (37bb880)
TerminalCtrl: Clipboard access protocol (write) is advertised in DA. (4f62f0f)
TerminalCtrl: XTVERSION sequence fix (thanks @j4james) (1f3ff94)
TerminalCtrl: Extendended Color format parsing refactored and optimized. (17c737c)
TerminalCtrl: DECRPM 2027 added (reports as permanently reset). (2b1a863)
TerminalCtrl: Parser optimization (d051a38)
TerminalCtrl: VTCell: IsSpecial() method added. VTPage: Minor optimizations. (5af5a33)
TerminalCtrl: Unused insert unicode menu item removed (should be implemented by client code) (6b5d9b1)
TerminalCtrl: Minor renderer optimizations. (bdbd35f)
TerminalCtrl: SetEmulationLevel & SetDeviceConformanceLevel methods are refactored. (511eb34)
TerminalCtrl: RefreshDisplay() method refactored and optimized. (a5b88ee)
TerminalCtrl: Background paint (inverse video) fix. (7b8deb8)
TerminalCtrl: Line length calculation is corrected. (c27c437)
TerminalCtrl: VTPage: Line offset calculation is corrected. (67fa91a)
TerminalCtrl: Option to treat ambiguous chars as wide (2 column) chars. (0f856ee)
TerminalCtrl: Width table updated (ambiguous width chars added). (abc7e6b)
TerminalCtrl: Width table updated (formatting chars table added). (4e6fb72)
TerminalCtrl: Device ID can be changed by the client. (09dff1d)
TerminalCtrl: Report extendend device attributes (term id). (185c9ac)
TerminalCtrl: Selector Mode now automatically initializes to text mode if the mode is unspecified (proper init). (6ecda9d)
TerminalCtrl: Examples are updated to reflect PtyWaitEvent integration & readme updated. (0a2ce7a)
PtyProcess: Windows ConPty now loads as dll. (1ccd90b)
PtyProcess: PtyWaitEvent class is added. Read method (win) refactored. (2fb3e25)
TerminalCtrl is the powerful VT engine behind Bobcat terminal emulator.
Enjoy!
Github page: https://github.com/ismail-yilmaz
Bobcat the terminal emulator: https://github.com/ismail-yilmaz/Bobcat
[Updated on: Sun, 17 August 2025 23:26] Report message to a moderator
|
|
|
|
|
|
| Re: A terminal emulator widget for U++ [message #61974 is a reply to message #51415] |
Sun, 12 April 2026 12:07  |
Oblivion
Messages: 1267 Registered: August 2007
|
Senior Contributor |
|
|
Hi,
I am excited to announce a major update to TerminalCtrl with enhanced graphics support, improved terminal compatibility, and numerous optimizations.
Key Features
- Kitty graphics protocol - Display inline images directly in your terminal using Kitty's graphics protocol
- Custom selector actions - Extend selector mode with your own actions
- Synchronized output mode (DECSET 2026) - Eliminate screen flicker during updates
- iTerm2 feature reports - Better terminal capability detection
- Sixel enhancements - Shared-palette support for improved graphics
- Enhanced control modes - 80↔132 column switching, in-band resize notifications, scrollbar visibility control, etc.
Performance & Quality
- Refactored key handling with improved AltGr support on Windows
- Text rendering optimizations through last-run caching
- UTF-8 processing speedups using read-ahead techniques
- Refined character width tables with emoji support
- Multiple VT52, Sixel, and mode behavior fixes
Added Methods
- `FlashDisplay()` - Trigger visual bell/flash
Full changelog available in the release notes.
And as usual, Bobcat (main branch) takes advantage of these new features, fixes and updates.
Best regards,
Oblivion
Github page: https://github.com/ismail-yilmaz
Bobcat the terminal emulator: https://github.com/ismail-yilmaz/Bobcat
[Updated on: Sun, 12 April 2026 12:08] Report message to a moderator
|
|
|
|
Goto Forum:
Current Time: Sat Jun 13 14:48:10 GMT+2 2026
Total time taken to generate the page: 0.01467 seconds
|