Skip to main content

Ability to read one keystroke from stdin

3 replies [Last post]
keeskuip
Offline
Joined: 2003-06-17

I'm trying to make a console-application (a short shell)
that needs to read every key from stdin at the moment
it is typed.
This is not possible right now.
I have to terminate the input with to get the
keys into java.

I would like to be able to read just one key from
stdin.

Kees.

Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
brucechapman
Offline
Joined: 2004-03-18

Its number 7 on the top 25 RFE list.

Here is the RFE http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=4050435

Go vote for it if you haven't already.

prunge
Offline
Joined: 2004-05-06

I agree.

Also the ability to read input without it echoing to the console would be useful for entering passwords, such as in keytool.

zander
Offline
Joined: 2003-06-13

Very good point !
I second that wish.