Spurious scroll events are being generated when pushing the wheel to the sides.

Bug #1828080 reported by Adrian Scripcă
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
KiCad
Fix Released
Low
Adrian Scripcă

Bug Description

Steps to reproduce:

1) have a Logitech M720 Triathlon mouse
2) use the middle button to pan around
3) get random zoom while panning around, depending on how the mouse moves

This happens because this mouse features horizontal axis scrolling and those events end up interpreted by KiCad as regular vertical axis scrolling.

Version information:

Application: pcbnew
Version: (5.1.0-487-g2c43d4d6b-dirty), debug build
Libraries:
    wxWidgets 3.0.4
    libcurl/7.64.0 GnuTLS/3.6.5 zlib/1.2.11 libidn2/2.0.5 libpsl/0.20.2 (+libidn2/2.0.5) libssh/0.8.6/openssl/zlib nghttp2/1.36.0 librtmp/2.3
Platform: Linux 5.0.0-13-generic x86_64, 64 bit, Little endian, wxGTK
Build Info:
    wxWidgets: 3.0.4 (wchar_t,wx containers,compatible with 2.8) GTK+ 3.24
    Boost: 1.65.1
    OpenCASCADE Community Edition: 6.9.1
    Curl: 7.64.0
    Compiler: Clang 8.0.0 with C++ ABI 1002
Build settings:
    USE_WX_GRAPHICS_CONTEXT=OFF
    USE_WX_OVERLAY=ON
    KICAD_SCRIPTING=ON
    KICAD_SCRIPTING_MODULES=ON
    KICAD_SCRIPTING_PYTHON3=OFF
    KICAD_SCRIPTING_WXPYTHON=ON
    KICAD_SCRIPTING_WXPYTHON_PHOENIX=OFF
    KICAD_SCRIPTING_ACTION_MENU=ON
    BUILD_GITHUB_PLUGIN=ON
    KICAD_USE_OCE=ON
    KICAD_USE_OCC=OFF
    KICAD_SPICE=ON

I attached a patch that fixes the issue by skipping the handling of horizontal scroll events.

Tags: pcbnew
tags: added: pcbnew
Changed in kicad:
status: New → Triaged
importance: Undecided → Low
assignee: nobody → John Beard (john-j-beard)
milestone: none → 5.1.3
Revision history for this message
Adrian Scripcă (benishor) wrote :
Revision history for this message
Seth Hillbrand (sethh) wrote :

I would prefer that we handle the horizontal scroll events correctly rather than skipping them. Skipping while a mouse button is depressed probably makes sense, however.

Revision history for this message
KiCad Janitor (kicad-janitor) wrote :

Fixed in revision e10c01aaff11d414386ce2886c9361211459d856
https://git.launchpad.net/kicad/patch/?id=e10c01aaff11d414386ce2886c9361211459d856

Changed in kicad:
status: Triaged → Fix Committed
assignee: John Beard (john-j-beard) → Adrian Scripcă (benishor)
Revision history for this message
John Beard (john-j-beard) wrote :

@Seth: what is the right reaction to a horizontal scrollwheel? Horizontal pan?

I've pushed the attached fix to master/5.1, so at least middle-mouse panning can work as "normal" for 2D scrolling mice (interpreting as a vertical scroll -> zoom is certainly not helpful, IMO).

Adding extra handling to the axis == 1 case can be added on top.

Revision history for this message
Adrian Scripcă (benishor) wrote :

@Seth is right. The original fix invalidated some horizontal scrolling. I attached a new patch that does not mingle with the existing behaviour.

Revision history for this message
Adrian Scripcă (benishor) wrote :

The original patch should be reverted prior to applying the last one. Thank you!

Revision history for this message
Seth Hillbrand (sethh) wrote :

@John, I'd assume pan but you are right, maybe we keep it off until we have the configure options available to users

Revision history for this message
John Beard (john-j-beard) wrote :

@Seth, @Adrian, I have pushed the above patch with some minor wording changes and a couple of minor variations. It should now work as before in pan-mode, and should not do anything with horizontal wheel events in zoom-mode.

If we thing of something useful to do with horizontal wheel events in zoom-mode, it's easy to add: just add an else block after wx_view_controls.cpp line 221.

Revision history for this message
Adrian Scripcă (benishor) wrote :

Hi @John, looks good to me! I also had a chance to test the newest build and everything works OK for me. Thank you!

Revision history for this message
Seth Hillbrand (sethh) wrote :

Good call John! Looks good.

Changed in kicad:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.