File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
A friendly place for programming greenhorns!
Big Moose Saloon
Register / Login
Joined: Mar 21, 2008
May 28, 2008 08:32:00
quick question: how can I find out when the key F12 is pressed? (and of course do something when it is pressed?)
Joined: Mar 22, 2005
May 28, 2008 08:51:00
Assuming that this is AWT or Swing code, you'd add a
and trigger on KeyEvent.VK_F12 in one of its methods.
Ping & DNS, my free Android app for network diagnostics
Joined: Oct 27, 2005
May 29, 2008 12:38:00
I don't think you can catch it in a command line application. Rather than the application catching it, the shell or command window will catch it, and not pass it to the app.
SCJP 1.4 - SCJP 6 - SCWCD 5 - OCEEJBD 6
How To Ask Questions
How To Answer Questions
I agree. Here's the link:
subject: Catching F12
Sending a "Function Key" Message in JS
Show all/Jump to method in IntelliJ
Problems interrupting a thread
All times are in JavaRanch time: GMT-6 in summer, GMT-7 in winter
| Powered by
Copyright © 1998-2014