Reputation: 893
I have CLI implementation for my VisualWorks application. There is "IOAccessor defaultClass stdin" and I want to read one character without waiting for user enter press. It is possible?
in C language there is function like getCh ...
Upvotes: 1
Views: 400
Reputation: 3200
This is not a problem of the language: also the C-language getchar() will have to wait. It is a matter of the underlying Operating System's tty-code. On UNIX (eg. Linux), you'd have to change the tty-characteristics to unbuffered, using an stty (old-style) or ioctl call. Under other OSs, similar system calls do similar things.
Upvotes: 3