Skip to content

Can't command+click #273

Description

@ccorcos

Version

"@nut-tree/nut-js": "^1.7.0",

Short overview

This is my code

async function main() {
	await nut.sleep(2000)
	await nut.keyboard.pressKey(nut.Key.LeftSuper)
	await nut.mouse.leftClick()
	await nut.keyboard.releaseKey(nut.Key.LeftSuper)
}

main()

And I have a codepen with this:

document.addEventListener("click", event => {
		console.log(
			"click",
			event.metaKey
		)
});

document.addEventListener("keydown", event => {
		console.log(
			"keydown",
      event.key,
			event.metaKey
		)
});

document.addEventListener("keyup", event => {
		console.log(
			"keyup",
      event.key,
			event.metaKey
		)
});

And I'm seeing:

"click" false
"keyup" "Meta" false

Issue occurs on

  • Virtual machine
  • Docker container
  • Dev/Host system

Detailed error description

Steps to reproduce error

Additional content

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

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type

Projects

No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions