-
Notifications
You must be signed in to change notification settings - Fork 295
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Implement termios.tcgetattr
/tcsetattr
using P/Invoke
#1910
base: main
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you use LibraryImportAttribute instead?
Unfortunately it's one of those .NET 7+ exclusive features which we cant use (afaik) because of .NET Framework. |
What about using |
I thought that the biggest advantage of I am putting this PR in draft because #1912 has to be sorted out first. |
Yeah, that's ultimately the goal |
I kept a limited workaround for .NET because using
tcsetattr
to put stdin into the raw mode does not have the desired effect on .NET (works fine on Mono) — one can still edit the input line using all standard readline control keys. I have a feeling that for console support .NET is using lower level calls than the simpleread
on a descriptor 0, however, I didn't have time to investigate this in depth. I am submitting this PR with the workaround though before my window of availability for this project narrows.