#Consuming global key events on windows

1 messages · Page 1 of 1 (latest)

distant skiff
#

I'm messing with jNativeHook library to allow my java application to process keyInputs while still on the background but now i'm wondering if i can take further control of the OS.

Does anyone know if i can make a program for example disabling the ALT key entirely during its runtime?

smoky flowerBOT
#

<@&987246399047479336> please have a look, thanks.

#

Here is an AI assisted attempt to answer your question 🤖. Maybe it helps! In any case, a human is on the way 👍. To continue talking to the AI, you can use </chatgpt:1108714622413963314>.

#
TJ-Bot
I'm messing with jNativeHook library to allow my java application to process keyInputs while still on the background but now i'm wondering if i can take further control of the OS. Does anyone know if i can make a program for example disabling the ALT key

advantage of this library to consume global key events on Windows. Is it possible to use jNativeHook to capture key inputs across all windows and applications running on the system, not just within my own Java application?

Unfortunately, jNativeHook is limited in its ability to capture global key events on Windows. It can only intercept events within the Java Virtual Machine (JVM) process that is running your application. This means that it cannot capture key inputs from other applications or windows outside of your Java program.

If you require the ability to capture global key events across all applications and windows on the system, you may need to look into using a different library or tool that provides this functionality. One popular option for capturing global key events on Windows is using the Windows API directly through a language like C++.

Keep in mind that capturing global key events outside of your own application can raise security and privacy concerns, so be sure to consider the implications of implementing this functionality in your software. Additionally, be aware that some operating systems may have restrictions or limitations on capturing global key events for security reasons.

In conclusion, while jNativeHook is a useful library for capturing key inputs within your Java application, it has limitations when it comes to consuming global key events across all windows and applications on Windows.

distant skiff
#

time to learn C++

quartz river
distant skiff
#

Nvm, i'll get on that thanks for the direction 😎

quartz river
#

you can use jextract to generate ffm bindings for the whole windows api

#

and then you can just call them

distant skiff
#

yes

quartz river
#

I may have several threads hidden in #1051826284008853505

#

@distant skiff

#

@distant skiff

distant skiff
#

perfect

quartz river
#

@distant skiff tell me if you have any question

distant skiff
#

but this was insightful stuff