DaniWeb IT Discussion Community

DaniWeb IT Discussion Community (http://www.daniweb.com/forums/index.php)
-   Java (http://www.daniweb.com/forums/forum9.html)
-   -   F-keys in java (http://www.daniweb.com/forums/thread153224.html)

Nichito Oct 24th, 2008 3:06 am
F-keys in java
 
Hello...

is there any way of making java listen or capture an F-key input? i mean, like, if the user presses F5, a new panel will come up and that sorts of things...

thnx

darkagn Oct 24th, 2008 10:02 am
Re: F-keys in java
 
The KeyEvent class has constants for each of the F-keys. You can use a KeyAdapter to listen for a key press, although this is an abstract class so of course you will need to write your own extension. Check out the API on both of these classes for more details.

Ezzaral Oct 24th, 2008 10:51 am
Re: F-keys in java
 
And read through this tutorial as well:
http://java.sun.com/docs/books/tutor...eybinding.html

Nichito Oct 25th, 2008 2:19 am
Re: F-keys in java
 
great, thanks!!


All times are GMT -4. The time now is 11:09 am.

Forum system based on vBulletin Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
©2003 - 2009 DaniWeb® LLC