Behaviour of ctrl+mouse_scroll

Bug #1505292 reported by Mattias Andrée
24
This bug affects 4 people
Affects Status Importance Assigned to Milestone
Terminator
New
Wishlist
Unassigned

Bug Description

Recently, Terminator changed behaviour for
ctrl+mouse_scroll. The new behaviour is to change font
size. I must say, I really dislike this; I rather it send a
number of ctrl+up/down ("\e[$n;5A", "\e[$n;5B").

I cannot find any setting for changing this. Would you
consider adding this, or point be to it if it does exist?

Revision history for this message
Stephen Boddy (stephen-j-boddy) wrote :

I thought the Ctrl-mousewheel zoom was rather neat myself. It is a common idiom in many programs to zoom in/out using that combo.

You say you want the control + up/down escape codes. Can you explain: are these defaults used in a particular program you use? A script you wrote yourself?

It is currently hardcoded in terminal.py, Terminal class, on_mousewheel method. The code is fairly readable. The simplest hack fix would be to insert comment out the line around 349:
     self.vte.connect('scroll-event', self.on_mousewheel)

This will disable the zooming. For me I do not get any Ctrl-Up/Down sequences when disabling this. This is custom to your setup?

Changed in terminator:
importance: Undecided → Low
status: New → Opinion
Revision history for this message
Mattias Andrée (maandree) wrote :

Zooming makes no since for me because my font only looks good in one size.
And If I do want to zoom, I can use keyboard combinations. And mapping ctrl+wheel
to zoom functions is troublesome because I often scroll and have not yet released
ctrl. (Also, my mouse scrolls one step by itself sometimes…) However, mapping
ctrl+wheel to ctrl+up/down would enable me to scroll through large documents
much quicker. Much more quick than using search functions.

It would also be useful to enable shift+wheel (and other combination in addition to
alt+wheel) to be mapped to shift+up/down. It could also be nice to have such
combinations to be noop-mapped.

I currently do not have this setup.

Revision history for this message
Stephen Boddy (stephen-j-boddy) wrote :

Ahhhhh! The penny drops. I read this as a bug that I'd broken an existing workflow. I see now that you are actually proposing a wishlist item, i.e. to enable mouse behaviour to be configurable. That's quite a bit more involved. Marking as Wishlist.

Changed in terminator:
importance: Low → Wishlist
status: Opinion → New
Revision history for this message
Egmont Koblinger (egmont-gmail) wrote :

See bug 1518700, I think the same pattern could be applied here.

If the underlying application is interested in mouse events, send it to that. If not, zoom.

You could also decide never to send Ctrl+Shift+scroll to the app but always zoom.

(Requires vte's gtk3 branch.)

Revision history for this message
Egmont Koblinger (egmont-gmail) wrote :

By the way, I think zooming in terminals is overrated. It's not like a webpage with all different font and icon sizes. It's just text of fixed size. I configure my terminals to a font size that's pleasing to my eyes, and hardly ever see a reason to change it.

Revision history for this message
Egmont Koblinger (egmont-gmail) wrote :
Revision history for this message
Egmont Koblinger (egmont-gmail) wrote :

@Mattias: What's your exact use case? What app and config do you use that allows quicker scroll when Ctrl is held down?

Revision history for this message
Mattias Andrée (maandree) wrote :

Mostly working on large documents in Emacs. I find that I can quicker get to de desired location by scrolling with ctrl than searching. Jumping directly to the desired line is normally not an option because I seldom know the line number of where I want to go.

Revision history for this message
Egmont Koblinger (egmont-gmail) wrote :

Doesn't work for me, says "<mouse-20> is undefined" (or 21 for the opposite direction.)

Do you have any special config for this?

Revision history for this message
Mattias Andrée (maandree) wrote :

No, nothing special. I have not tested on a no-X installation (which is a bit different even when not using graphics).

It is a bit weird that it should say <mouse-20>. That is quite a high button index.

`printf '\e[?1049h' ; od -t x1 ; printf '\e[?1049l'` outputs a number (the exact number depends on the heights of the terminal) of ^[[1;5B for me when I am scrolling down with ctrl down (^[[1;5B for up).

Revision history for this message
Egmont Koblinger (egmont-gmail) wrote :

Oh, I see now! I did have terminal mouse enabled in emacs, you don't. So, for you, emacs doesn't receive mouse events but keypresses as it's faked by the emulator. And it knows that on Ctrl+Up or Ctrl+Down it should scroll faster than on Up or Down.

Revision history for this message
Hicks (hickscorp) wrote :

I +1 this. I think It's related to https://bugs.launchpad.net/terminator/+bug/1638607?comments=all
Super annoying for us with trackpads (Accidental ctrl+zoom) or inertia scrolling enabled then fast switching to Terminator.

An option to completelly disable zooming would be nice!

Imo, the bindings panel should be revamped a bit, allowing both keypresses and mouse events. This way, those kind of settings would become accessible easily for everyone.

Revision history for this message
Arttu Manninen (atmosphear) wrote :

I +1 this too for exactly the same reason as @hickscorp, touchpad inertia issue happens to me several times a day. This is why I would love to see the scroll to zoom to be configurable.

Revision history for this message
Marc Wimmer (marc-wimmer) wrote :

+1 from me please please please

Revision history for this message
Ian Robertson (ian-b-robertson) wrote :

+1 from another user suffering accidental font resizing due to trackpad.

Revision history for this message
David Vicklund (dvicklund) wrote :

+1 here as well - I see there's an option to configure the keybinding to zoom-in/out (ctrl++/ctrl+-), but nowhere can I control the behavior of ctrl+scroll wheel to zoom. Very annoying with a trackpad.

Revision history for this message
Hicks (hickscorp) wrote :

Not much progress on this it appears - I have a found a solution that works-ish for me - I bind a `Ctrl+0` combination to `zoom_normal` like I'm used to in web browsers, so when the zoom changes by mistake in Terminator, I just hit that combination to revert it back to normal.

Revision history for this message
Radu (radu-berinde) wrote :

I also find this very annoying. My touchpad is sensitive and it frequently registers movement when I'm just typing. This gets triggered a lot when I happen to be holding Ctrl. Worse, the resize does not affect just the current terminal, but all of them (even in other tabs or windows?!). It is also very sensitive so I can't go back to the original size easily. Hitting the zoom_normal shortcut only fixes the current tab. I really wish this was configurable.

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.