You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Open a terminal emulator and use cd to navigate to the folder where said script (test.js) resides.
Type in node ./test.js
Expected behavior:
Numpad 1 gets pressed (virtually), so a "1" is typed into the terminal.
Actual behavior:
The key is not pressed, no "1" is typed into the terminal, and the following error is printed:
Error: Invalid key code specified.
at /wherever/node_modules/@nut-tree/nut-js/dist/lib/provider/native/libnut-keyboard.class.js:22:28
Additional content
Please provide any (mandatory) additional data to reproduce the error (Dockerfiles etc.)
I am using a US keyboard layout, and my keyboard has a numpad. I also have a mouse attached that presents itself as both a mouse and a keyboard (because it has some macro keys on the side).
I am using Xorg, not wayland.
I have two monitors attached to my computer, and the primary monitor is on the right of the secondary monitor.
The text was updated successfully, but these errors were encountered:
Version
2.0.0
Short overview
Calling
keyboard.pressKey(nut.Key.NumPad1)
doesn't work on Linux. It doesn't seem to work for any numpad key.Issue occurs on
Detailed error description
If you run the following code in Node.js 12.22.7 on Linux Mint 20.3 Cinnamon 20.3,
the result of the last line will be rejected with this error:
Steps to reproduce error
test.js
with the following content:cd
to navigate to the folder where said script (test.js
) resides.node ./test.js
Expected behavior:
Numpad 1 gets pressed (virtually), so a "1" is typed into the terminal.
Actual behavior:
The key is not pressed, no "1" is typed into the terminal, and the following error is printed:
Additional content
I am using a US keyboard layout, and my keyboard has a numpad. I also have a mouse attached that presents itself as both a mouse and a keyboard (because it has some macro keys on the side).
I am using Xorg, not wayland.
I have two monitors attached to my computer, and the primary monitor is on the right of the secondary monitor.
The text was updated successfully, but these errors were encountered: