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 …
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
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.