not possible to disable zoom on middle mouse button - causes usability problem when using mouse or wacom pen to pan

Bug #882043 reported by eirik hanssen
44
This bug affects 8 people
Affects Status Importance Assigned to Milestone
Inkscape
Triaged
Wishlist
Unassigned

Bug Description

Inkscape 0.48.2 r9819

Using Ubuntu linux 10.04
Standard hp 3 button cord mouse with mouse wheel
Cintiq 21 UX with wacom pen

Is there no way to disable the zoom on the middle mouse button click?
I tried to google it, read through insckape manual, browsed though the inkscape configuration files, but could not find a way to disable zoom on the middle mouse button click in inkscape. When searching I found someone else who also wanted to disable zoom from the middle mouse button but couldn't find out how: http://www.inkscapeforum.com/viewtopic.php?f=6&t=3479

An option I like very much is make mouse the mouse wheel scroll by default., and use the middle button to pan the canvas when dragging. Then it is not necceceary to also have zoom on middle mouse button click. This button should be possible to redifine to do something else. I have found no way to disable the zoom from the middle mouse button.

It would be nice to be able to redefine all actions/hotkeys like it is possible in Gimp.

Problem 1:
When using Cintiq 21 UX, I use the button on the side of the pen as a middle mouse button to pan the canvas. But as soon as I release the button inkscape also zooms in (the middle mouse click is sendt even if I use it to drag) and the canvas 'jumps' off screen, so that I have to zoom out, pan and zoom in again. This makes it in effect impossible to use the pan function with the side buttons on the wacom pen.

Problem2:
Sometimes when I want to pan with the mouse, I zoom in when it isn't my intention. This problem is worse when working with worn out mice that will send a click when you want to drag. When I was an Inkscape beginner I didn't know that the middle button also had zoom function and this was very frustrating.

description: updated
su_v (suv-lp)
tags: added: ui
removed: button middle mouse
Changed in inkscape:
importance: Undecided → Wishlist
Revision history for this message
su_v (suv-lp) wrote :

> Problem2:
> Sometimes when I want to pan with the mouse, I zoom in when it isn't
> my intention. This problem is worse when working with worn out
> mice that will send a click when you want to drag.

The minimal drag distance in screen pixels aka "click/drag threshold" can be adjusted in the preferences - maybe this helps with old mices:

File > Inkscape Preferences > Mouse: Click/drag threshold ___ (default: 4)

Revision history for this message
eirik hanssen (eirikhanssen79) wrote :

Problem 2 solution:
Thanks, that's always nice to be aware of. I also think that will help with old mice.

Revision history for this message
Ricardo Graça (devius) wrote :

Setting the Click/drag threshold to 0 improved the usability a lot in my case. My mouse isn't old, but it was still emitting a lot of undesired clicks with the middle button.

Revision history for this message
chrysn (chrysn) wrote :

this not only affects usability with tablets; every form of mouse that can middle-click without moving is affected. for example, when using a trackpoint, idly pondering where to pan next can lead to surprising results. disabling the "zoom on middle click" feature would be a helpful option.

Revision history for this message
Todor Eemreorov (blurymind-gmail) wrote :

Dear devs, please add an option to disable this idiotic behavior and have it ON by default. It's been bugging me for years.
It's not a feature, its a bug. I keep zooming by mistake while inking with my tablet. I want to pan. I sometimes touch the stylus button that pans by mistake and it zooms in.

Come on, looks like a low hanging fruit. filed 2011, its almost 2014 now.

Revision history for this message
eirik hanssen (eirikhanssen79) wrote :

I am hoping that someone with knowledge of how the zooming function is implemented in Inkscape can look at this.

Having an option to disable zoom on middle click would enable users of tablet to configure a button for middle click for panning the canvas. The way it is implemented now makes it impractical for tablet users to pan the canvas. (Because when trying to pan the canvas using the talet, the zoom in event is also fired).

The best way to do this would in my opinion be to adopt the way the gimp project allows users to configure just about all the commands the program does to whatever mouse or keyboard bindings they want.

If some developer with knowledge (but not time) reads this, please direct me to what I should read to gain understanding of how to hack the zooming function binding. I have some programming experience including C++ and would like to try and hack this behaviour if it won't be prioritized.

Cincerely yours,
Eirik Hanssen (original bug reporter)

Changed in inkscape:
status: New → Confirmed
Revision history for this message
eirik hanssen (eirikhanssen79) wrote :

If someone want to help me resolve this matter, please read on.

I believe it is possible to disable the zoom on middle mouseclick behaviour by editing the following file (that you get after downloading development sourcecode) :

inkscape/src/ui/tools/tool-base.cpp, and then recompiling inkscape.

To download the sourcecode follow instructions here: http://www.inkscape.org/en/develop/getting-started/

It seems this function handles events:

bool ToolBase::root_handler(GdkEvent* event) {
(...)
    switch (event->type) {
(...)
    case GDK_BUTTON_PRESS:
(...)
        case 2:
/* My comment here: since middle click is button 2 in this context, the behaviour might be corrected here */
/* But actually this case only sets some variables. The zoom in event actually fires on middle button release. */
/* Further down in the switch statement: */

    case GDK_MOTION_NOTIFY:
/* Probably to find out if there is some dragging motion involved, the variable zoom_rb seems important */

    case GDK_BUTTON_RELEASE:
/* this is probably where the zoom event is actually triggered. I think there are checks to decide what action to take here */
/* for instanse to fire a zoom event or to release the canvas drag */
/* will investigate further later */

Cheers,
Eirik Hanssen

jazzynico (jazzynico)
Changed in inkscape:
status: Confirmed → Triaged
tags: added: preferences
Changed in inkscape:
milestone: none → 1.0
Patrick Storz (ede123)
Changed in inkscape:
milestone: 1.0-old → 1.0
tags: added: bug-migration
Revision history for this message
Matthijs Kooijman (matthijskooijman) wrote :

This report was migrated (manually, I think) to gitlab here: https://gitlab.com/inkscape/inbox/-/issues/3190

Revision history for this message
Jean Franco Amoni Rodríguez (datalot) wrote :

This now has been solved for Inkscape 1.1.
Yu can download it before it releases here: https://inkscape.org/release/inkscape-master/?latest=1

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.