© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
C#C
C#•9mo ago•
9 replies
Deleted User 7f983ae1

✅ Console Read ANSI Escape Sequence

I am running a test application to receive mouse tracking events(mouse movement/click), however, I face difficulty when trying to stream the ANSI escape sequence.

I attempted:
- Use
Console.ReadKey(true)
Console.ReadKey(true)
=> It refused to read
ESC
ESC
(
\x1b
\x1b
)
- Use
Console.In.Read()
Console.In.Read()
=> write the ANSI escape sequence on screen and doesn't have any result until clicking enter(which would loaded a set amount of item based on buffer size, and further item is discarded)
- Use a
StreamReader
StreamReader
and set console input to the stream reader by
Cobsole.SetOn
Cobsole.SetOn
, then use
.Read()
.Read()
to read => Same result as above

Does anyone have suggestions on how I can receive the actual raw input (I just need an ordered sequence of byte based on the sequence of input whether the input is made by human or automatically input by terminal emulator base on ANSI escape sequence configuration)
C# banner
C#Join
We are a programming server aimed at coders discussing everything related to C# (CSharp) and .NET.
61,871Members
Resources

Similar Threads

Was this page helpful?
Recent Announcements

Similar Threads

Console showing ←[92m using ansi
C#CC# / help
3y ago
❔ Why does it say unrecognized escape sequence?
C#CC# / help
4y ago
✅ Unrecognized escape sequence how do I solve it ?
C#CC# / help
2y ago