Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

GlobalScreen.postNativeEvent Not Working When Windows Screensaver Is Active #458

Open
Megatron1000 opened this issue Feb 16, 2024 · 0 comments

Comments

@Megatron1000
Copy link

Megatron1000 commented Feb 16, 2024

I'm using jnativehook to trigger media keys on Windows.

Everything works perfectly until the Windows screensaver is active, at which point triggering the keys has no effect.
It logs:

com.github.kwhat.jnativehook.GlobalScreen postNativeEvent
SEVERE: hook_post_event [244]: SendInput() failed! (0X5)

An example of a command I'm using is the following, to trigger volume down:
GlobalScreen.postNativeEvent(new NativeKeyEvent(2401, 0, 174, 57390, NativeKeyEvent.CHAR_UNDEFINED));

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant