Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Adding a KeyListener to a terminal-based app




On 28-Feb-08, at 20:59 , Scott Palmer wrote:

I wonder if you could use java.io.Console (Java 6) somehow.. possibly in combination with System.in. If only Console exposed methods to turn echo on and off..sigh... looks like an RFE for Sun though.


Actually last time I tried that on a Unix machine that didn't change much. What you need to play with is termio, at least on Unix based machines, since Windows is another beast. You can grab a native lib that might help you:


http://ajmas.dyndns.org/?loc=projects/javatermio/index

I used this with JDK 1.4 and unfortunately I am not aware of a pure Java solution. Let me know how it works out.

Andre

_______________________________________________
Do not post admin requests to the list. They will be ignored.
Java-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/java-dev/email@hidden

This email sent to email@hidden
References: 
 >Adding a KeyListener to a terminal-based app (From: Tom <email@hidden>)
 >Re: Adding a KeyListener to a terminal-based app (From: Mike Swingler <email@hidden>)
 >Re: Adding a KeyListener to a terminal-based app (From: Tom <email@hidden>)
 >Re: Adding a KeyListener to a terminal-based app (From: Scott Palmer <email@hidden>)



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.