Description
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 themouse-event%
, while it is reported byget-mouse-state
. -
get-mouse-state reports
left
button instead ofright
ormiddle
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)
- mouse-event%:
-
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