Open dkaraush opened 6 years ago
If you run java -jar JNativeHook.jar
(found in the lib/lib
folder), you can see the data provided by JNativeHook
. The issue is that the typed
event does not have a keyCode
(it returns 0). It does however return a keyChar
and a rawCode
which may be a bit more useful.
However, to fix this would require changing gkm-java
so it is possible to either return all the values like JNativeHook
does when you start the jar file.
Given I don't maintain this anymore, I'd suggest you use the key.pressed
and key.released
instead.
I have tested simple code:
require("gkm").events.on("key.typed",console.log);
Output:Node version: v8.6.0 NPM version: v5.3.0
java
version: 1.8.0_91javac
version: 1.8.0_60 OS: Windows 7 (x64)