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

mouse-event% vs get-mouse-state issues #255

Open
Metaxal opened this issue Jan 5, 2022 · 3 comments
Open

mouse-event% vs get-mouse-state issues #255

Metaxal opened this issue Jan 5, 2022 · 3 comments

Comments

@Metaxal
Copy link
Contributor

Metaxal commented Jan 5, 2022

Following the results gathered from https://racket.discourse.group/t/help-me-gather-keystrokes-and-mouse-events-for-varied-platforms/307/7

On Mac, there are several issues:

  • control isn't reported in the mouse-event%, while it is reported by get-mouse-state.

  • get-mouse-state reports left button instead of right or middle
    Example of such discrepancies:

    • mouse-event%: right:shift:meta:right-down
      get-mouse-state: (914 602 left shift meta control)
    • mouse-event%: right:right-down
      get-mouse-state: (614 435 left control)
  • Some Mac users reported that modifiers are not picked at all with mouse events

On Windows, things are mostly ok except that meta or alt are not always reported in the mouse-event%. Otherwise, the event also reports meta while the state reports alt.
Example:

  • mouse-event%: control:shift:left-up
    get-mouse-state: (1878 456 shift control alt)

On Unix, the only issue I found is that the mouse-event% reports meta while the state reports alt.

Unfortunately I don't own a Mac or a Windows machine (only a Linux) so I can't really attempt to debug this. However, one can easily try it out with this:

raco pkg install racket-paint
racket -l- racket-paint/event-listener --mouse-state
@Metaxal
Copy link
Contributor Author

Metaxal commented Jan 5, 2022

Related issues:
#236
#252

@racket-discourse-github-bot

This issue has been mentioned on Racket Discussions. There might be relevant details there:

https://racket.discourse.group/t/help-me-gather-keystrokes-and-mouse-events-for-varied-platforms/307/8

@Metaxal
Copy link
Contributor Author

Metaxal commented Jan 6, 2022

Most tests were on Racket CS 8.3

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