Make mouse wheel modifiers configurable

Bug #1032946 reported by v_2e on 2012-08-04
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
qpdfview
Wishlist
Adam Reichold

Bug Description

  Hello!
  Today I noticed that 'Shift+mouse scroll" rotates the document instead of do the horizontal scrolling like most of applications I know of do. (Good examples are Inkscape and GIMP which are specially designed to make the frequend zooming in/out and scrolling as handy as possible).
  So maybe it is worth changing the current Qpdfview behaviour to that one in order to stick with the conventional feel?

  Regards,
    Vladimir

Adam Reichold (adamreichold) wrote :

Hello Vladimir,

Thanks for reporting. I think this is probably best described as a Qt-versus-Gtk issue as the default for horizontal scrolling in a QScrollArea is ALT and mouse wheel which is also how it works in qpdfview. Since this seems the default in the Qt ecosystem and I would have to actually override the QScrollArea's behaviour to change it, it would rather leave it as it is. (A list of what the modifiers do is in the help in the section on the main view.)

Best regards, Adam.

Changed in qpdfview:
status: New → Opinion
v_2e (v-2e) wrote :

Hello!
Well, I didn't know it was a Qt default behaviour. That is a strong argument.
But in such case what about making a bit of tuning of the shortcuts available to users? Perhaps, in the future releases?

Regards,
  Vladimir

Adam Reichold (adamreichold) wrote :

Hello again,

I do like the idea but I would want a way to do it without adding too much code since a small code base is one of qpdfview's primary goals. So it will probably end up as three combo boxes in the settings dialog (growing and growing, probably should add tabs there again...) to select the modifiers for the three mouse wheel actions.

So yes, I have it on my list. It may take a while though.

Regards, Adam.

v_2e (v-2e) wrote :

> a small code base is one of qpdfview's primary goals.
Yes, that is a good goal and I support it too. That it is why it is really worth considering carefully all pros and cons before adding some additional code.

Regards,
  Vladimir

Adam Reichold (adamreichold) wrote :

Ok, I done some internal preparations in trunk revision 490 to change the mouse wheel modifiers but there is no interface yet. But you can change (and test) it by setting the keys "zoomModifiers", "rotateModifiers" and "horizontalModifiers" in the section "documentView" in the configuration file usually located at "~/.config/qpdfview/qpdfview.conf".

Because of how this is currently implemented, you can set only a single modifier key for each action where 67108864 corresponds to CTRL, 33554432 corresponds to SHIFT and 134217728 corresponds to ALT. (These are internal values of Qt's KeyboardModifier enum.)

Fortunately, I found a possibility for refractoring so that the code size isn't really affected. :-)

Adam Reichold (adamreichold) wrote :

Ok, since trunk revision 499, it should be possible to choose the keyboard modifiers via the settings dialog. Please test and report.

v_2e (v-2e) wrote :

  Hello!
  I downloaded rev. 502, compiled it and tested. It looks like it functions normal so far. At least I easily changed the key bindings, tried to play with a couple of documents a bit, closed the application, then started it back, and everything continued working as I configured.
  So thanks for such a quick implementation!

  Regards,
    Vladimir

Adam Reichold (adamreichold) wrote :

Good to know. Converting this into a wishlist item to track possible regressions in the future.

Regards, Adam.

Changed in qpdfview:
status: Opinion → Fix Committed
importance: Undecided → Wishlist
assignee: nobody → Adam Reichold (adamreichold)
milestone: none → 0.3.3
summary: - Shift+mouse scroll should do horizontal scrolling
+ Make mouse wheel modifiers configurable
Changed in qpdfview:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers