gui icon indicating copy to clipboard operation
gui copied to clipboard

mouse-event% vs get-mouse-state issues

Open Metaxal opened this issue 3 years ago • 3 comments

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 avatar Jan 05 '22 15:01 Metaxal

Related issues: https://github.com/racket/gui/issues/236 https://github.com/racket/gui/issues/252

Metaxal avatar Jan 05 '22 15:01 Metaxal

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

Most tests were on Racket CS 8.3

Metaxal avatar Jan 06 '22 11:01 Metaxal