Skip to content

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

Open
@Metaxal

Description

@Metaxal

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions