Skip to content

Error: [nut.js] - Error: Invalid key flag specified. #506

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
1 of 3 tasks
pablohpsilva-forjnetwork opened this issue Apr 25, 2023 · 1 comment
Closed
1 of 3 tasks

Comments

@pablohpsilva-forjnetwork

Version
"@nut-tree/nut-js": "^3.1.1",

Short overview
Whenever I have multiple keys being pressed like:

keyboard.pressKey(Key.RightCmd, Key.RightBracket);
// or 
keyboard.type(Key.RightCmd, Key.RightBracket);

Thea application throws an exception:
(node:32260) UnhandledPromiseRejectionWarning: Error: [nut.js] - Error: Invalid key flag specified.

Issue occurs on

  • Virtual machine
  • Docker container
  • Dev/Host system

Detailed error description

I'm using a Macbook Pro M1, latest MacOS.
Running nut-js in the latest electron.

Steps to reproduce error

Simply call the following like without a try-catch (so it will force an exception):

keyboard.pressKey(Key.RightCmd, Key.RightBracket);

Additional content

Please provide any (mandatory) additional data to reproduce the error (Dockerfiles etc.)

@s1hofmann
Copy link
Member

Hi @pablohpsilva-forjnetwork 👋

This is a known issue and is planned for v3.1.2: #490

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants