You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Mar 26, 2022. It is now read-only.
Then, I realized I can do a hack, and use an ANSI code to move the cursor alllll the way to the bottom right, then use another ANSI code, that replies with the current cursor position. this works!
However, I can't read the stdin where the response goes, without pressing enter. And to read without pressing enter, requires going into "non-canonical" mode (A.K.A raw mode). Which, doesn't seem to be able to be done, without ioctl or termios :(
For a full screen matrix effect.
Attempted solutions
First I tried getting the
$LINES
and$COLUMNS
, but I guess that is not supported in programs.Doing some more researc, seems C programs seem to use
ioctl
ortermios
to do this: https://stackoverflow.com/questions/1022957/getting-terminal-width-in-c . However, in WASI we don't have this.Then, I realized I can do a hack, and use an ANSI code to move the cursor alllll the way to the bottom right, then use another ANSI code, that replies with the current cursor position. this works!
However, I can't read the stdin where the response goes, without pressing enter. And to read without pressing enter, requires going into "non-canonical" mode (A.K.A raw mode). Which, doesn't seem to be able to be done, without
ioctl
ortermios
:(See my fustration at: eb51dab
Which has nice links to the POSIX behind the scenes on how this could be implemented.
This problem mostly steams from me not being able to find docs on how to implement an
ioctl
ortermios
API.The text was updated successfully, but these errors were encountered: