Skip to content

Commit

Permalink
more notes an wheel event (#55)
Browse files Browse the repository at this point in the history
  • Loading branch information
almarklein authored May 19, 2022
1 parent ac02d03 commit 6c4d509
Showing 1 changed file with 12 additions and 5 deletions.
17 changes: 12 additions & 5 deletions jupyter_rfb/events.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,11 +43,18 @@
* **wheel**: emitted when the mouse-wheel is used (scrolling),
or when scrolling/pinching on the touchpad/touchscreen.
Similar to the JS wheel event, one "wheel action" results in a
cumulative ``dy`` of about 100. Positive values of ``dy`` are associated
with scrolling down and zooming out. Positive values of ``dx`` are
associated with scrolling to the right. A note for Qt users: the sign
of the deltas is (usually) reversed compared to the QWheelEvent.
Similar to the JS wheel event, the values of the deltas depend on the
platform and whether the mouse-wheel, trackpad or a touch-gesture is
used. Also, scrolling can be linear or have inertia. As a rule of
thumb, one "wheel action" results in a cumulative ``dy`` of around
100. Positive values of ``dy`` are associated with scrolling down and
zooming out. Positive values of ``dx`` are associated with scrolling
to the right. (A note for Qt users: the sign of the deltas is (usually)
reversed compared to the QWheelEvent.)
On MacOS, using the mouse-wheel while holding shift results in horizontal
scrolling. In applications where the scroll dimension does not matter,
it is therefore recommended to use `delta = event['dy'] or event['dx']`.
* *dx*: the horizontal scroll delta (positive means scroll right).
* *dy*: the vertical scroll delta (positive means scroll down or zoom out).
Expand Down

0 comments on commit 6c4d509

Please sign in to comment.