This week's book giveaway is in the Servlets forum.
We're giving away four copies of Murach's Java Servlets and JSP and have Joel Murach on-line!
See this thread for details.
The moose likes Beginning Java and the fly likes Read keypress event in core java? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "Read keypress event in core java?" Watch "Read keypress event in core java?" New topic
Author

Read keypress event in core java?

Ganesan Ramakrishnan
Ranch Hand

Joined: Mar 18, 2008
Posts: 88
Hi all,

I wanna read the keys which is pressed by users in core java.

Regards
Ganesan
Norm Radder
Ranch Hand

Joined: Aug 10, 2005
Posts: 685
Use a key listener.
Rob Spoor
Sheriff

Joined: Oct 27, 2005
Posts: 19651
    
  18

Which will only work in Swing / AWT. On the command line you can use System.in.read(), although that will usually wait until the user presses enter.


SCJP 1.4 - SCJP 6 - SCWCD 5 - OCEEJBD 6
How To Ask Questions How To Answer Questions
Ganesan Ramakrishnan
Ranch Hand

Joined: Mar 18, 2008
Posts: 88
Is that not possible in core Java?

Regards
Ganesan
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 41068
    
  43
What do you mean by "core Java"? What kind of application are you talking about?


Ping & DNS - my free Android networking tools app
Ganesan Ramakrishnan
Ranch Hand

Joined: Mar 18, 2008
Posts: 88
I mean, i do not want to do it in awt / swing .

regards
Ganesan
Rajkamal Pillai
Ranch Hand

Joined: Mar 02, 2005
Posts: 443
    
    1


On the command line you can use System.in.read(), although that will usually wait until the user presses enter.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Read keypress event in core java?
 
Similar Threads
client technologies
How to perform a core dump
Core dump of Java Application
Core dump of Java Application
java devlopement on linux