Search code examples
javajna

JNA NativeKeyEvent to char


Hi I'm using JNA and I'd like to convert a NativeKeyEvent to a char or String which I can then use in java, how would I conver the keycode back to a char?

When I use the .keyChar I get:

Key Typed -> Output

a -> ￿
s -> ￿
d -> ￿
f -> ￿

Solution

  • I ended up writing a method to manually convert them.