Skip to content
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

Have a way of discerning click events #703

Open
hobnob opened this issue Feb 28, 2024 · 1 comment
Open

Have a way of discerning click events #703

hobnob opened this issue Feb 28, 2024 · 1 comment

Comments

@hobnob
Copy link
Member

hobnob commented Feb 28, 2024

At the moment click events only fire on a left mouse click, with no way to discern a right click from any other click event. We should fire the click event when a right or left click happen, allow discerning which button was clicked, and allow any pointer device clicks.

@davesmith00000
Copy link
Member

I've had a look into this, two things:

  1. There is no Right click, but we could latch onto the contextmenu event, what do you think?
  2. There is a workaround. You can listen for pointer events, like this:
    case c @ PointerEvent.PointerUp(_) =>
      println(c.button) // Tells you which button was released, e.g. : `RightMouseButton`
      Outcome(viewModel)

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

No branches or pull requests

2 participants