简体   繁体   中英

Java: KeyListener

I was just wondering if it was possible to add a key listener to components outside a java application. In other words, what do I need to do in order to detect the keys typed when the focus isn't on the java application?

Thanks in advance,

S.

Unfortunately, you can't detect key events to programs running outside of your Java application. It you want to do that, you'll have to write your program in a native language (C, C++, etc.)

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM