Open tisonkun opened 6 months ago
Thank you for your report.
On Windows, the keyboard listener explicitly includes the currently active modifiers when translating the keyboard event (represented by KBDLLHOOKSTRUCT
) into a character representation (see here).
It would certainly be possible to perform an additional lookup without any modifiers active, but I would need to consider a reasonable way to integrate this, and implement similar functionality for the other platforms as well.
Reported at https://github.com/GreptimeTeam/demo-scene/issues/2.
More simpler repro:
Shift
+3
will result inKey.shfit
+#
instead ofKey.shfit
+3
.Is it possible we get exactly the key pressed? Or this is a limitation of sys API or hardware API.
I noticed that https://github.com/LaunchMenu/node-global-key-listener can get properly
3,true,LEFT SHIFT,true
forShift
+3
.