jnativehook icon indicating copy to clipboard operation
jnativehook copied to clipboard

GlobalScreen.postNativeEvent Not Working When Windows Screensaver Is Active

Open Megatron1000 opened this issue 1 year ago • 0 comments

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));

Megatron1000 avatar Feb 16 '24 20:02 Megatron1000