Skip to content

Fixes #4730. AnsiDriver will only capture Ctrl+Z if we move the mouse in Windows.#4731

Merged
tig merged 29 commits intogui-cs:v2_developfrom
BDisp:v2_4730_ansidriver-ctrl-z-fix
Mar 5, 2026
Merged

Fixes #4730. AnsiDriver will only capture Ctrl+Z if we move the mouse in Windows.#4731
tig merged 29 commits intogui-cs:v2_developfrom
BDisp:v2_4730_ansidriver-ctrl-z-fix

Conversation

@BDisp
Copy link
Copy Markdown
Collaborator

@BDisp BDisp commented Feb 19, 2026

Fixes

Proposed Changes/Todos

  • Use the native ReadConsoleInput instead of ReadFile
  • Still supports VT sequences for key and mouse
  • Removed any dotnet System.Console calls

Pull Request checklist:

  • I've named my PR in the form of "Fixes #issue. Terse description."
  • My code follows the style guidelines of Terminal.Gui - if you use Visual Studio, hit CTRL-K-D to automatically reformat your files before committing.
  • My code follows the Terminal.Gui library design guidelines
  • I ran dotnet test before commit
  • I have made corresponding changes to the API documentation (using /// style comments)
  • My changes generate no new warnings
  • I have checked my code and corrected any poor grammar or misspellings
  • I conducted basic QA to assure all features are working

@BDisp BDisp requested a review from tig as a code owner February 19, 2026 21:50
@codecov
Copy link
Copy Markdown

codecov Bot commented Feb 19, 2026

Codecov Report

❌ Patch coverage is 18.84058% with 168 lines in your changes missing coverage. Please review.
✅ Project coverage is 77.51%. Comparing base (ab86a47) to head (19c4ba8).
⚠️ Report is 1 commits behind head on v2_develop.

Files with missing lines Patch % Lines
...minal.Gui/Drivers/UnixDriver/UnixTerminalHelper.cs 11.76% 73 Missing and 2 partials ⚠️
...minal.Gui/Drivers/AnsiDriver/AnsiTerminalHelper.cs 13.95% 36 Missing and 1 partial ⚠️
...nal.Gui/Drivers/AnsiDriver/WindowsVTInputHelper.cs 0.00% 17 Missing ⚠️
Terminal.Gui/Drivers/DotNetDriver/NetOutput.cs 37.03% 15 Missing and 2 partials ⚠️
Terminal.Gui/Drivers/AnsiDriver/AnsiInput.cs 8.33% 10 Missing and 1 partial ⚠️
Terminal.Gui/Drivers/AnsiDriver/AnsiOutput.cs 26.66% 10 Missing and 1 partial ⚠️

❌ Your patch status has failed because the patch coverage (18.84%) is below the target coverage (70.00%). You can increase the patch coverage or adjust the target coverage.

Additional details and impacted files
@@              Coverage Diff               @@
##           v2_develop    #4731      +/-   ##
==============================================
- Coverage       77.63%   77.51%   -0.13%     
==============================================
  Files             464      466       +2     
  Lines           45822    45946     +124     
  Branches         6861     6876      +15     
==============================================
+ Hits            35576    35613      +37     
- Misses           8237     8319      +82     
- Partials         2009     2014       +5     
Files with missing lines Coverage Δ
Terminal.Gui/App/Keyboard/ApplicationKeyboard.cs 86.13% <100.00%> (+1.48%) ⬆️
...al.Gui/Drivers/AnsiDriver/WindowsVTOutputHelper.cs 0.00% <ø> (ø)
Terminal.Gui/Drivers/DriverImpl.cs 80.74% <100.00%> (+9.99%) ⬆️
Terminal.Gui/Drivers/UnixDriver/UnixOutput.cs 73.75% <100.00%> (+0.33%) ⬆️
...erminal.Gui/Drivers/WindowsDriver/WindowsOutput.cs 37.35% <100.00%> (+0.36%) ⬆️
Terminal.Gui/Drivers/AnsiDriver/AnsiInput.cs 20.71% <8.33%> (+1.15%) ⬆️
Terminal.Gui/Drivers/AnsiDriver/AnsiOutput.cs 40.52% <26.66%> (+0.65%) ⬆️
...nal.Gui/Drivers/AnsiDriver/WindowsVTInputHelper.cs 0.00% <0.00%> (ø)
Terminal.Gui/Drivers/DotNetDriver/NetOutput.cs 49.57% <37.03%> (-3.77%) ⬇️
...minal.Gui/Drivers/AnsiDriver/AnsiTerminalHelper.cs 13.95% <13.95%> (ø)
... and 1 more

... and 2 files with indirect coverage changes


Continue to review full report in Codecov by Sentry.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update ab86a47...19c4ba8. Read the comment docs.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@BDisp
Copy link
Copy Markdown
Collaborator Author

BDisp commented Feb 25, 2026

To test pressing Ctrl+Z to suspend the app using WSL, we have to open the respective distro first and run the app. Debugging WSL through the IDE doesn't work.

@BDisp
Copy link
Copy Markdown
Collaborator Author

BDisp commented Feb 25, 2026

Hey @tig, could you run the unit tests on your Mac? I've run them on an Intel Mac and didn't get any errors, but there might be some incompatibility with the ARM64. It could also just be a conditional failure, but I'd appreciate it if you could confirm that, just to be sure. Thanks.

@BDisp
Copy link
Copy Markdown
Collaborator Author

BDisp commented Mar 1, 2026

Should this glyph appear by default now? Isn't the idea to avoid displaying glyphs that might constantly change in unit tests?

 Expected:
 ┌────────────────────────────────────────────────────────────────────┐
 │   ╔═══════════════════════════════════════════════════════════╗    │
 │   ║UI Catalog: A comprehensive sample library and test app for║    │
 │   ║                                                           ║    │
 │   ║ _______                  _             _   _____       _  ║    │
 │   ║|__   __|                (_)           | | / ____|     (_) ║    │
 │   ║   | | ___ _ __ _ __ ___  _ _ __   __ _| || |  __ _   _ _  ║    │
 │   ║   | |/ _ \ '__| '_ ` _ \| | '_ \ / _` | || | |_ | | | | | ║    │
 │   ║   | |  __/ |  | | | | | | | | | | (_| | || |__| | |_| | | ║    │
 │   ║   |_|\___|_|  |_| |_| |_|_|_| |_|\__,_|_(_)_____|\__,_|_| ║    │
 │   ║                                                           ║    │
 │   ║                      v2 - Pre-Alpha                       ║    │
 │   ║                                                           ║    │
 │   ║          https://github.com/gui-cs/Terminal.Gui           ║    │
 │   ║                                                           ║    │
 │   ║                                                   ⟦► OK ◄⟧║    │
 │   ╚═══════════════════════════════════════════════════════════╝    │
 └────────────────────────────────────────────────────────────────────┘
  But Was:
 ┌⡿───────────────────────────────────────────────────────────────────┐
 │   ╔⢿══════════════════════════════════════════════════════════╗    │
 │   ║UI Catalog: A comprehensive sample library and test app for║    │
 │   ║                                                           ║    │
 │   ║ _______                  _             _   _____       _  ║    │
 │   ║|__   __|                (_)           | | / ____|     (_) ║    │
 │   ║   | | ___ _ __ _ __ ___  _ _ __   __ _| || |  __ _   _ _  ║    │
 │   ║   | |/ _ \ '__| '_ ` _ \| | '_ \ / _` | || | |_ | | | | | ║    │
 │   ║   | |  __/ |  | | | | | | | | | | (_| | || |__| | |_| | | ║    │
 │   ║   |_|\___|_|  |_| |_| |_|_|_| |_|\__,_|_(_)_____|\__,_|_| ║    │
 │   ║                                                           ║    │
 │   ║                      v2 - Pre-Alpha                       ║    │
 │   ║                                                           ║    │
 │   ║          https://github.com/gui-cs/Terminal.Gui           ║    │
 │   ║                                                           ║    │
 │   ║                                                   ⟦► OK ◄⟧║    │
 │   ╚═══════════════════════════════════════════════════════════╝    │
 └────────────────────────────────────────────────────────────────────┘

@tig
Copy link
Copy Markdown
Collaborator

tig commented Mar 1, 2026

Should this glyph appear by default now? Isn't the idea to avoid displaying glyphs that might constantly change in unit tests?

 Expected:
 ┌────────────────────────────────────────────────────────────────────┐
 │   ╔═══════════════════════════════════════════════════════════╗    │
 │   ║UI Catalog: A comprehensive sample library and test app for║    │
 │   ║                                                           ║    │
 │   ║ _______                  _             _   _____       _  ║    │
 │   ║|__   __|                (_)           | | / ____|     (_) ║    │
 │   ║   | | ___ _ __ _ __ ___  _ _ __   __ _| || |  __ _   _ _  ║    │
 │   ║   | |/ _ \ '__| '_ ` _ \| | '_ \ / _` | || | |_ | | | | | ║    │
 │   ║   | |  __/ |  | | | | | | | | | | (_| | || |__| | |_| | | ║    │
 │   ║   |_|\___|_|  |_| |_| |_|_|_| |_|\__,_|_(_)_____|\__,_|_| ║    │
 │   ║                                                           ║    │
 │   ║                      v2 - Pre-Alpha                       ║    │
 │   ║                                                           ║    │
 │   ║          https://github.com/gui-cs/Terminal.Gui           ║    │
 │   ║                                                           ║    │
 │   ║                                                   ⟦► OK ◄⟧║    │
 │   ╚═══════════════════════════════════════════════════════════╝    │
 └────────────────────────────────────────────────────────────────────┘
  But Was:
 ┌⡿───────────────────────────────────────────────────────────────────┐
 │   ╔⢿══════════════════════════════════════════════════════════╗    │
 │   ║UI Catalog: A comprehensive sample library and test app for║    │
 │   ║                                                           ║    │
 │   ║ _______                  _             _   _____       _  ║    │
 │   ║|__   __|                (_)           | | / ____|     (_) ║    │
 │   ║   | | ___ _ __ _ __ ___  _ _ __   __ _| || |  __ _   _ _  ║    │
 │   ║   | |/ _ \ '__| '_ ` _ \| | '_ \ / _` | || | |_ | | | | | ║    │
 │   ║   | |  __/ |  | | | | | | | | | | (_| | || |__| | |_| | | ║    │
 │   ║   |_|\___|_|  |_| |_| |_|_|_| |_|\__,_|_(_)_____|\__,_|_| ║    │
 │   ║                                                           ║    │
 │   ║                      v2 - Pre-Alpha                       ║    │
 │   ║                                                           ║    │
 │   ║          https://github.com/gui-cs/Terminal.Gui           ║    │
 │   ║                                                           ║    │
 │   ║                                                   ⟦► OK ◄⟧║    │
 │   ╚═══════════════════════════════════════════════════════════╝    │
 └────────────────────────────────────────────────────────────────────┘

SOme recent PR is somehow setting DrawIndicator in a unit test or something. This is the 2nd time i've seen this.

@BDisp
Copy link
Copy Markdown
Collaborator Author

BDisp commented Mar 1, 2026

Fixed in #4777.

@BDisp
Copy link
Copy Markdown
Collaborator Author

BDisp commented Mar 1, 2026

That's a good reason to remove System.Console from the other drivers, except for DotNetDriver which is based on it.

@BDisp
Copy link
Copy Markdown
Collaborator Author

BDisp commented Mar 1, 2026

I'm getting the same error related to the glyph. Could it be related to some static object that isn't reset in each unit test?

Actual:   "┌⣻┐\n│h│\n│ │\n│╭►\n│⣻ "
            ↑ (pos 1)
  Stack Trace:
     at UnitTests.DriverAssert.AssertDriverContentsWithFrameAre(String expectedLook, ITestOutputHelper output, IDriver driver) in /home/runner/work/Terminal.Gui/Terminal.Gui/Tests/UnitTests/DriverAssert.cs:line 459
   at UnitTests.ViewsTests.TabViewTests.ShowTopLine_False_TabsOnBottom_True_TestTabView_Width3() in /home/runner/work/Terminal.Gui/Terminal.Gui/Tests/UnitTests/Views/TabViewTests.cs:line 746
   at System.RuntimeMethodHandle.InvokeMethod(ObjectHandleOnStack target, Void** arguments, ObjectHandleOnStack sig, BOOL isConstructor, ObjectHandleOnStack result)
   at System.RuntimeMethodHandle.InvokeMethod(ObjectHandleOnStack target, Void** arguments, ObjectHandleOnStack sig, BOOL isConstructor, ObjectHandleOnStack result)
   at System.Reflection.MethodBaseInvoker.InterpretedInvoke_Method(Object obj, IntPtr* args)
   at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)
  Standard Output Messages:
 Expected:
 ┌─┐
 │h│
 │ │
 │╭►
 ││ 
  But Was:
 ┌⣻┐
 │h│
 │ │
 │╭►
 │⣻ 

@BDisp
Copy link
Copy Markdown
Collaborator Author

BDisp commented Mar 1, 2026

I think we should make an effort to move and update all unit tests in the UnitTests project to the UnitTests.Parallelizable project. I suspect there's some static configuration that sporadically uses the spinner feature that isn't explicitly disabled, and some unit test is using it even if don't want it to.

@tig
Copy link
Copy Markdown
Collaborator

tig commented Mar 1, 2026

I think we should make an effort to move and update all unit tests in the UnitTests project to the UnitTests.Parallelizable project. I suspect there's some static configuration that sporadically uses the spinner feature that isn't explicitly disabled, and some unit test is using it even if don't want it to.

Do you have any idea how much time I've put into moving tests? Of course we should.

I noted above that glyph is the drawindicator. Some recent pr is somehow setting View.DrawIndicator or something else is corrupting it.

@tig
Copy link
Copy Markdown
Collaborator

tig commented Mar 2, 2026

Found it.

image

@BDisp
Copy link
Copy Markdown
Collaborator Author

BDisp commented Mar 4, 2026

When do you think you'll have time to revise this PR?

tig and others added 4 commits March 4, 2026 16:32
Replaces Logging with Trace.Lifecycle for all lifecycle and error logging in AnsiInput, AnsiOutput, UnixTerminalHelper, and WindowsVTInputHelper, standardizing log output. Adds conditional workaround for Ctrl+Z handling in WindowsVTInputHelper to address ReadFile EOF bug. Fixes a bug in AnsiOutput size query parsing. Cleans up code and updates .DotSettings with new technical terms.
Simplifies input event checking by replacing the Peek() implementation with a direct call to GetNumberOfConsoleInputEvents, removing manual memory management and redundant native API usage. Eliminates the use of FlushConsoleInputBuffer during console mode restoration. Updates comments, region organization, and fixes a logging typo for improved clarity and maintainability.
Always synthesize 0x1A byte on zero-byte ReadFile result,
removing conditional compilation and TryHandleCtrlZ method.
Ensures the Ctrl+Z bug workaround is always active and
simplifies input handling. Updated comments for clarity.
@tig
Copy link
Copy Markdown
Collaborator

tig commented Mar 5, 2026

I'm working on this now. I'll report back once I have all the facts.

@tig
Copy link
Copy Markdown
Collaborator

tig commented Mar 5, 2026

While I'm working on this, I suggest you go look at https://github.com/gui-cs/VTTest as well as

The gist is a) it's possible to work around the ctrlz problem without having to resort to using the WIn32 console APIs, and b) it looks like the WT team now has a fix in development.

@tig
Copy link
Copy Markdown
Collaborator

tig commented Mar 5, 2026

The problem

Issue #4730: The ANSI driver on Windows won't capture Ctrl+Z unless the mouse is moved first. This is caused by a longstanding Windows bug where ReadFile with ENABLE_VIRTUAL_TERMINAL_INPUT treats Ctrl+Z as EOF and returns 0 bytes instead of the 0x1A (SUB) byte (microsoft/terminal#4958). The Windows Terminal team now has a fix in development (microsoft/terminal#19940).

Why the original PR approach was fundamentally wrong

I built the ANSI driver specifically to avoid native Win32 console APIs. That's its entire reason for existing. The ANSI driver reads input as a VT byte stream — ReadFile with ENABLE_VIRTUAL_TERMINAL_INPUT set — and lets the terminal convert all input (keyboard, mouse, resize) into ANSI escape sequences. The same AnsiResponseParser and AnsiKeyConverter parsing logic then works identically on Windows, Linux, and macOS. That's the architecture. That's the point.

I said as much in the issue discussion. I closed the issue as "won't fix" and explained that if someone really needs Ctrl+Z on Windows, they can use the Windows or DotNet drivers. I explicitly said: "I do not want the Ansi driver contaminated with dotnet Console code. I worked really hard to make it independent."

The PR was submitted anyway. And it did exactly what I said not to do.

The author replaced ReadFile (which reads the VT byte stream) with ReadConsoleInputW (which reads raw INPUT_RECORD structures — KeyEventRecord, MouseEventRecord, etc.). ReadConsoleInputW is the Win32 console API. It's exactly the API the Windows driver uses. This change:

  1. Bypassed VT input mode entirely. ReadConsoleInputW consumes native console events before the console can convert them to VT sequences. The ENABLE_VIRTUAL_TERMINAL_INPUT flag we carefully set becomes meaningless — there are no events left for it to convert.

  2. Broke the ANSI driver's fundamental architecture. The entire ANSI input pipeline — AnsiResponseParser, AnsiKeyConverter, SGR mouse parsing, ANSI request/response handling — expects a stream of ANSI escape sequence characters. Raw INPUT_RECORD structures contain none of that. The author had to manually extract UnicodeChar from KeyEventRecord and skip non-key events. Mouse events? Discarded. ANSI responses (like screen size queries)? Gone. The input path was gutted.

  3. Duplicated the Windows driver. Parsing INPUT_RECORD structures is literally what WindowsInputProcessor already does. The "fix" turned the ANSI driver's input path into a partial, broken copy of the Windows driver. If we wanted ReadConsoleInputW, we'd just use the Windows driver.

  4. All to fix a niche edge case. Ctrl+Z on Windows in a TUI app is not something most users will ever notice is missing. And the bug has a trivial workaround that preserves the architecture: detect the 0-byte ReadFile return and synthesize the 0x1A byte that ReadFile should have returned. That's a 3-line fix, not a 500-line rewrite that inverts the driver's design.

The author said "my change won't break anything" — but it broke the fundamental contract the ANSI driver is built on.

Credit where it's due

That said, the PR also included genuinely useful work that I appreciate and have kept:

  • Removing System.Console calls from the ANSI and Unix drivers — this is something I'd wanted for a long time. BDisp systematically found and replaced Console.* usage with direct platform APIs, which is exactly the right direction.
  • Delegating Suspend to IOutput with per-driver implementations — a clean refactoring that moved platform-specific suspend/resume logic out of DriverImpl and into the output classes where it belongs.
  • Adding unit tests for AnsiInput Peek/Read and for Suspend functionality.
  • Removing UnixTerminalHelper from DotNetDriver — another good cleanup.

These changes align with the ANSI driver's goals and I'm grateful for them. My objection is solely with the ReadConsoleInputW approach to the Ctrl+Z fix.

What this PR does now

I rewrote the Ctrl+Z fix to be minimal and architecturally correct, while keeping BDisp's other improvements:

  1. Kept ReadFile for reading the VT byte stream. This is the correct API when ENABLE_VIRTUAL_TERMINAL_INPUT is set. Removed ReadConsoleInputW entirely.
  2. Added the Ctrl+Z workaround — when ReadFile returns success with 0 bytes on a live console handle with processed input disabled, synthesize 0x1A (SUB). This is the same approach VTTest validates and is documented at ReadFile: Ctrl+Z sends EOF even if console is in 'raw' mode microsoft/terminal#4958.
  3. Fixed logging levelsTrace.Lifecycle for one-time lifecycle events (init, shutdown), Logging.Warning for errors and exceptional conditions, and commented out hot-path tracing in the read loop that would fire on every input event.

The PR keeps GetNumberOfConsoleInputEvents and ReadFile P/Invokes in WindowsVTInputHelper for now — these are correct and working.

Future Work: Replace remaining P/Invokes with .NET Stream

Even with the fix above, WindowsVTInputHelper still uses two Win32 APIs I'd like to eliminate: GetNumberOfConsoleInputEvents (for polling) and ReadFile (for reading). Both can be replaced with Console.OpenStandardInput() and Stream.ReadAsyncVTTest proves this works on Windows, including the Ctrl+Z edge case where the stream returns 0 bytes.

I attempted this here. It compiled, and mostly worked, but it broke ANSI request/responses at runtime — specifically the screen size query (CSI_ReportWindowSizeInChars) stopped working. Rather than trying to debug that now and risk destabilizing this PR further, I'm documenting the plan below for a future PR: #4796

tig and others added 3 commits March 5, 2026 14:08
Trace.Lifecycle should be used for normal lifecycle events (init,
shutdown). Logging.Warning should be used for errors and exceptional
conditions. Hot-path tracing in the read loop is commented out.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@BDisp
Copy link
Copy Markdown
Collaborator Author

BDisp commented Mar 5, 2026

I said as much in the issue discussion. I closed the issue as "won't fix" and explained that if someone really needs Ctrl+Z on Windows, they can use the Windows or DotNet drivers. I explicitly said: "I do not want the Ansi driver contaminated with dotnet Console code. I worked really hard to make it independent."

Just so you know, I was very upset with your attitude, because you didn't even give me the opportunity to explain my reasons and simply closed the issue I created when I was sure my idea would work.

The PR was submitted anyway. And it did exactly what I said not to do.

On the contrary, I think that besides not breaking anything, I even added another key combination. At least you acknowledged that I completely eliminated System.Console in AnsiDriver. But please see the explanations below.

  1. Bypassed VT input mode entirely. ReadConsoleInputW consumes native console events before the console can convert them to VT sequences. The ENABLE_VIRTUAL_TERMINAL_INPUT flag we carefully set becomes meaningless — there are no events left for it to convert.

The statement that I ignore VT Input is incorrect. Since the ENABLE_VIRTUAL_TERMINAL_INPUT flag is enabled, all key and mouse events are present in UnicodeChar as VT Input. The only event that is ignored is the one related to buffer resizing, which isn't needed because AnsiDriver obtains it by sending VT requests. Nothing is consumed because ENABLE_VIRTUAL_TERMINAL_INPUT is enabled, and it is only consumed after being processed by the driver.

  1. Broke the ANSI driver's fundamental architecture. The entire ANSI input pipeline — AnsiResponseParser, AnsiKeyConverter, SGR mouse parsing, ANSI request/response handling — expects a stream of ANSI escape sequence characters. Raw INPUT_RECORD structures contain none of that. The author had to manually extract UnicodeChar from KeyEventRecord and skip non-key events. Mouse events? Discarded. ANSI responses (like screen size queries)? Gone. The input path was gutted.

This analysis is completely false. Events are sent to AnsiResponseParser just as they are sent by ReadFile, including keystrokes, mouse input, and VT request responses.

  1. Duplicated the Windows driver. Parsing INPUT_RECORD structures is literally what WindowsInputProcessor already does. The "fix" turned the ANSI driver's input path into a partial, broken copy of the Windows driver. If we wanted ReadConsoleInputW, we'd just use the Windows driver.

Another completely false statement. Although it uses libraries that are used in WindowsDriver, the processing is completely different. In WindowsDriver, mouse events are captured in INPUT_RECORD and converted to MouseEvent by WindowsInputProcessor. In my PR, everything is captured as VT Input because UnicodeChar has ANSI escape sequences related to mouse events and not the INPUT_RECORD structure.

  1. All to fix a niche edge case. Ctrl+Z on Windows in a TUI app is not something most users will ever notice is missing. And the bug has a trivial workaround that preserves the architecture: detect the 0-byte ReadFile return and synthesize the 0x1A byte that ReadFile should have returned. That's a 3-line fix, not a 500-line rewrite that inverts the driver's design.

I completely disagree. While it's not possible to suspend a terminal in Windows, Ctrl+Z is widely used to undo entries in all reputable editors, including Windows Terminal.

The author said "my change won't break anything" — but it broke the fundamental contract the ANSI driver is built on.

I still completely disagree, because I didn't break anything and I added at least one more key combination.

@tig
Copy link
Copy Markdown
Collaborator

tig commented Mar 5, 2026

You broke the intent. I'm done arguing with you about this. You continue to discount my main point: the ansi driver's purpose is to not use platform APIs as much as possible.

The ctrlz issue is now fixed with 3 lines of code.

@tig tig merged commit 4579dad into gui-cs:v2_develop Mar 5, 2026
12 of 14 checks passed
@BDisp BDisp deleted the v2_4730_ansidriver-ctrl-z-fix branch March 5, 2026 22:17
@BDisp
Copy link
Copy Markdown
Collaborator Author

BDisp commented Mar 5, 2026

You broke the intent. I'm done arguing with you about this. You continue to discount my main point: the ansi driver's purpose is to not use platform APIs as much as possible.

I apologize, I only just realized that your intention is to stop using platform APIs as much as possible, and I thought it was just to stop using System.Console. Therefore, the matter is closed and understood.

The ctrlz issue is now fixed with 3 lines of code.

I've seen it and it was resolved very well. I also believe it's the only combination that isn't captured, and in that case, I think it's safe to assume it's Ctrl+Z.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

AnsiDriver will only capture Ctrl+Z if we move the mouse in Windows.

2 participants