Open Fabrizio-Caruso opened 6 years ago
Yes, but it's complicated and not the ACK's responsibility --- you need to put the tty into raw mode using termios or the TCGETA and TCSETA ioctls. Unfortunately, the ACK's libc is missing bindings for these.
Thanks a lot for the reply!
@davidgiven does this mean that without the bindings in libc, there is no simple way to do this?
@davidgiven, I have sent my letter to Santa Claus: I hope one day unbuffered input will be possible (somehow) on ELF binaries.
My understand is that it is currently not possible. Am I right?
You can get unbuffered input provided you're willing to use the TCGETA and TCSETA ioctls.
Adding termios bindings is a completely reasonable request; I'll see what I can do.
Has there been any progress on this? If not, could you please point me to any doc about TCGETA and TCSETA ioctls with examples on how to use them to read the status of keyboard? Possibly with auto-repeat, i.e., keeping the same key down should produce a key-press any time the status is polled.
Is there an option or a simple way to produce an ELF Linux binary with unbuffered input? getchar() is buffered by default on Linux systems.
Is this feature available through some APIs?