You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
IDLE bindings for scrolling using buttons 4 and 5 should only apply to X11 #103820
On X11, vertical scrolling is conventionally done using events for mouse “buttons” 4 and 5. But on Win32 and Aqua, which have a dedicated event for scrolling (<MouseWheel> in Tk), buttons 4 and 5 correspond to additional hardware buttons present on some mice. Tk 8.6 and earlier do not abstract away these platform differences, so bindings in IDLE for scrolling should ignore buttons 4 and 5 on non-X11.
Accordingly, idlelib.idle_test.test_sidebar.ShellSidebarTest.test_mousewheel should be revised to check the windowing system, so that it correctly distinguishes between Aqua and XQuartz (which sys.platform == 'darwin' does not do), sends button 4/5 events on X11 only, and sends <MouseWheel> with the correct sign for delta on Aqua.
Tk 8.7 (TIP 474) will change mouse events to be consistent across windowing systems. This requires further revisions, but I imagine it is better to separately address issues for Tk ≤ 8.6 first.
Activity
terryjreedy commentedon Apr 25, 2023
The
topic-IDLElabel makes sure I get notified.gh-103820: IDLE: Do not interpret buttons 4/5 as scrolling on non-X11 (…
pythongh-103820: IDLE: Do not interpret buttons 4/5 as scrolling on n…
pythongh-103820: IDLE: Do not interpret buttons 4/5 as scrolling on n…
[3.12] gh-103820: IDLE: Do not interpret buttons 4/5 as scrolling on …
[3.11] gh-103820: IDLE: Do not interpret buttons 4/5 as scrolling on …
serhiy-storchaka commentedon Feb 2, 2024
Thank you for your contribution @chrstphrchvz. For this issue and for others, whose turn has not yet come to me.
pythongh-103820: IDLE: Do not interpret buttons 4/5 as scrolling on n…
pythongh-103820: IDLE: Do not interpret buttons 4/5 as scrolling on n…